From a9d2e3f5766a338b1d64ae3142453e199ac4269a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Fri, 16 Nov 2012 10:55:11 +0100 Subject: [PATCH] Dialog: Tiny code improvements --- ui/jquery.ui.dialog.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 9bd1f44a0..23c973975 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -209,7 +209,9 @@ $.widget("ui.dialog", { this._size(); this._position( this.options.position ); - this.overlay = this.options.modal ? new $.ui.dialog.overlay( this ) : null; + if ( this.options.modal ) { + this.overlay = new $.ui.dialog.overlay( this ); + } this._moveToTop( null, true ); this._show( this.uiDialog, this.options.show ); @@ -277,7 +279,7 @@ $.widget("ui.dialog", { if ( event.keyCode !== $.ui.keyCode.TAB ) { return; } - var tabbables = $( ":tabbable", this.uiDialog ), + var tabbables = this.uiDialog.find( ":tabbable" ), first = tabbables.filter( ":first" ), last = tabbables.filter( ":last" ); -- 2.39.5