aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-23 10:31:10 -0400
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-24 17:02:32 -0400
commit14691ae6feea2732ec5aeae57b4275aa0e4d1beb (patch)
treec98e38f2caef68070bb52975a472229f9e973002 /tests/visual
parent2a2a2c017c4395799ec07666f4ca14e078b52b5b (diff)
downloadjquery-ui-14691ae6feea2732ec5aeae57b4275aa0e4d1beb.tar.gz
jquery-ui-14691ae6feea2732ec5aeae57b4275aa0e4d1beb.zip
Dialog: Save the active element that opened the dialog and restore focus to that. Fixes #8730 - Dialog: Restore focus to opener.
Diffstat (limited to 'tests/visual')
-rw-r--r--tests/visual/dialog/complex-dialogs.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/visual/dialog/complex-dialogs.html b/tests/visual/dialog/complex-dialogs.html
index 634bfb3d6..264787185 100644
--- a/tests/visual/dialog/complex-dialogs.html
+++ b/tests/visual/dialog/complex-dialogs.html
@@ -22,13 +22,13 @@
<script>
$(function() {
- $( "#dialog" ).dialog({
- modal: true,
- height: 300,
- width: 500
- });
+ var dialog = $( "#dialog" ).dialog({
+ modal: true,
+ height: 300,
+ width: 500
+ }),
- var datepickerDialog = $( "#dialog-datepicker" ).dialog({
+ datepickerDialog = $( "#dialog-datepicker" ).dialog({
autoOpen: false,
modal: true
}),
@@ -39,6 +39,10 @@
width: 600
});
+ $( "#open-dialog" ).click(function() {
+ dialog.dialog( "open" );
+ });
+
$( "#open-datepicker" ).click(function() {
datepickerDialog.dialog( "open" );
});
@@ -70,6 +74,8 @@
<a href="#">Outside link</a>
+<button id="open-dialog">Reopen dialog</button>
+
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
<p><button id="open-datepicker">Open another window with a datepicker.</button></p>