aboutsummaryrefslogtreecommitdiffstats
path: root/ui/dialog.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2014-02-21 13:22:39 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2014-02-21 19:57:34 +0100
commitdf6110c0d424ff3306fdd5576011f2dcf4d242d0 (patch)
treeccf0b23716deebd37e27578e01d5b9b1790d5a16 /ui/dialog.js
parent1c278f97fca0aa1f3a473396e15c217419a99746 (diff)
downloadjquery-ui-df6110c0d424ff3306fdd5576011f2dcf4d242d0.tar.gz
jquery-ui-df6110c0d424ff3306fdd5576011f2dcf4d242d0.zip
Core: Deprecate .focus( n ), replace in dialog with explicit timeouts
Fixes #9646
Diffstat (limited to 'ui/dialog.js')
-rw-r--r--ui/dialog.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/dialog.js b/ui/dialog.js
index 07100c934..12dc1da65 100644
--- a/ui/dialog.js
+++ b/ui/dialog.js
@@ -342,10 +342,14 @@ return $.widget( "ui.dialog", {
last = tabbables.filter( ":last" );
if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
- first.focus( 1 );
+ this._delay(function() {
+ first.focus();
+ });
event.preventDefault();
} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
- last.focus( 1 );
+ this._delay(function() {
+ first.focus();
+ });
event.preventDefault();
}
},