diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-02-21 13:22:39 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-02-21 19:57:34 +0100 |
commit | df6110c0d424ff3306fdd5576011f2dcf4d242d0 (patch) | |
tree | ccf0b23716deebd37e27578e01d5b9b1790d5a16 /ui/dialog.js | |
parent | 1c278f97fca0aa1f3a473396e15c217419a99746 (diff) | |
download | jquery-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.js | 8 |
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(); } }, |