Skip to content

Commit a9d2e3f

Browse files
committed
Dialog: Tiny code improvements
1 parent fdc8102 commit a9d2e3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ui/jquery.ui.dialog.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ $.widget("ui.dialog", {
209209

210210
this._size();
211211
this._position( this.options.position );
212-
this.overlay = this.options.modal ? new $.ui.dialog.overlay( this ) : null;
212+
if ( this.options.modal ) {
213+
this.overlay = new $.ui.dialog.overlay( this );
214+
}
213215
this._moveToTop( null, true );
214216
this._show( this.uiDialog, this.options.show );
215217

@@ -277,7 +279,7 @@ $.widget("ui.dialog", {
277279
if ( event.keyCode !== $.ui.keyCode.TAB ) {
278280
return;
279281
}
280-
var tabbables = $( ":tabbable", this.uiDialog ),
282+
var tabbables = this.uiDialog.find( ":tabbable" ),
281283
first = tabbables.filter( ":first" ),
282284
last = tabbables.filter( ":last" );
283285

0 commit comments

Comments
 (0)