From a0b84767a76098cdcc6375dfe28a7fee866bd395 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Tue, 10 Jun 2014 12:38:26 +0200 Subject: Dialog: Fix shift-tab handling, focus the correct element Copy-paste error introduced in df6110c0d424ff3306fdd5576011f2dcf4d242d0 Updates the tabbing test to be more specific about which element should have focus, instead of only checking if focus is within the dialog. Ref #9646 Ref #10103 Closes gh-1264 --- ui/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/dialog.js') diff --git a/ui/dialog.js b/ui/dialog.js index 358000881..7998b042c 100644 --- a/ui/dialog.js +++ b/ui/dialog.js @@ -348,7 +348,7 @@ return $.widget( "ui.dialog", { event.preventDefault(); } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { this._delay(function() { - first.focus(); + last.focus(); }); event.preventDefault(); } -- cgit v1.2.3