diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 2c7c6b57a..26989959e 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -95,15 +95,15 @@ $.widget( "ui.dialog", { parent: this.element.parent(), index: this.element.parent().children().index( this.element ) }; - this.originalTitle = this.element.attr( "title" ); + this.originalTitle = this.element.attr("title"); this.options.title = this.options.title || this.originalTitle; this._createWrapper(); this.element .show() - .removeAttr( "title" ) - .addClass( "ui-dialog-content ui-widget-content" ) + .removeAttr("title") + .addClass("ui-dialog-content ui-widget-content") .appendTo( this.uiDialog ); this._createTitlebar(); @@ -141,7 +141,7 @@ $.widget( "ui.dialog", { this.element .removeUniqueId() - .removeClass( "ui-dialog-content ui-widget-content" ) + .removeClass("ui-dialog-content ui-widget-content") .css( this.originalCss ) // Without detaching first, the following becomes really slow .detach(); @@ -154,7 +154,7 @@ $.widget( "ui.dialog", { next = originalPosition.parent.children().eq( originalPosition.index ); // Don't try to place the dialog next to itself (#8613) - if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { + if ( next.length && next[0] !== this.element[0] ) { next.before( this.element ); } else { originalPosition.parent.append( this.element ); @@ -178,11 +178,11 @@ $.widget( "ui.dialog", { this._isOpen = false; this._destroyOverlay(); - if ( !this.opener.filter( ":focusable" ).focus().length ) { + if ( !this.opener.filter(":focusable").focus().length ) { // Hiding a focused element doesn't trigger blur in WebKit // so in case we have nothing to focus on, explicitly blur the active element // https://bugs.webkit.org/show_bug.cgi?id=47182 - $( this.document[ 0 ].activeElement ).blur(); + $( this.document[0].activeElement ).blur(); } this._hide( this.uiDialog, this.options.hide, function() { @@ -199,7 +199,7 @@ $.widget( "ui.dialog", { }, _moveToTop: function( event, silent ) { - var moved = !!this.uiDialog.nextAll( ":visible" ).insertBefore( this.uiDialog ).length; + var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length; if ( moved && !silent ) { this._trigger( "focus", event ); } @@ -214,7 +214,7 @@ $.widget( "ui.dialog", { return; } - this.opener = $( this.document[ 0 ].activeElement ); + this.opener = $( this.document[0].activeElement ); this._size(); this._position(); @@ -225,8 +225,8 @@ $.widget( "ui.dialog", { this._focusTabbable(); this._isOpen = true; - this._trigger( "open" ); - this._trigger( "focus" ); + this._trigger("open"); + this._trigger("focus"); }, _focusTabbable: function() { @@ -236,15 +236,15 @@ $.widget( "ui.dialog", { // 3. Tabbable element inside the buttonpane // 4. The close button // 5. The dialog itself - var hasFocus = this.element.find( "[autofocus]" ); + var hasFocus = this.element.find("[autofocus]"); if ( !hasFocus.length ) { - hasFocus = this.element.find( ":tabbable" ); + hasFocus = this.element.find(":tabbable"); } if ( !hasFocus.length ) { - hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); + hasFocus = this.uiDialogButtonPane.find(":tabbable"); } if ( !hasFocus.length ) { - hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); + hasFocus = this.uiDialogTitlebarClose.filter(":tabbable"); } if ( !hasFocus.length ) { hasFocus = this.uiDialog; @@ -254,9 +254,9 @@ $.widget( "ui.dialog", { _keepFocus: function( event ) { function checkFocus() { - var activeElement = this.document[ 0 ].activeElement, - isActive = this.uiDialog[ 0 ] === activeElement || - $.contains( this.uiDialog[ 0 ], activeElement ); + var activeElement = this.document[0].activeElement, + isActive = this.uiDialog[0] === activeElement || + $.contains( this.uiDialog[0], activeElement ); if ( !isActive ) { this._focusTabbable(); } @@ -270,7 +270,7 @@ $.widget( "ui.dialog", { }, _createWrapper: function() { - this.uiDialog = $( "