Dialog: Tiny code improvements

This commit is contained in:
Jörn Zaefferer 2012-11-16 10:55:11 +01:00
parent fdc810277e
commit a9d2e3f576

View File

@ -209,7 +209,9 @@ $.widget("ui.dialog", {
this._size(); this._size();
this._position( this.options.position ); 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._moveToTop( null, true );
this._show( this.uiDialog, this.options.show ); this._show( this.uiDialog, this.options.show );
@ -277,7 +279,7 @@ $.widget("ui.dialog", {
if ( event.keyCode !== $.ui.keyCode.TAB ) { if ( event.keyCode !== $.ui.keyCode.TAB ) {
return; return;
} }
var tabbables = $( ":tabbable", this.uiDialog ), var tabbables = this.uiDialog.find( ":tabbable" ),
first = tabbables.filter( ":first" ), first = tabbables.filter( ":first" ),
last = tabbables.filter( ":last" ); last = tabbables.filter( ":last" );