aboutsummaryrefslogtreecommitdiffstats
path: root/ui/dialog.js
diff options
context:
space:
mode:
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();
}
},