]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Tiny code improvements
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 16 Nov 2012 09:55:11 +0000 (10:55 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 26 Nov 2012 09:28:23 +0000 (10:28 +0100)
ui/jquery.ui.dialog.js

index 9bd1f44a0fd36610ac34f3c4daa2df08d759e84a..23c973975d850719ff4690a9c348b681d77ed6bc 100644 (file)
@@ -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" );