File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -321,9 +321,14 @@ $.widget("ui.dialog", {
321321 . addClass ( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
322322 . prependTo ( this . uiDialog ) ;
323323 this . _on ( this . uiDialogTitlebar , {
324- mousedown : function ( ) {
325- // Dialog isn't getting focus when dragging (#8063)
326- this . uiDialog . focus ( ) ;
324+ mousedown : function ( event ) {
325+ // Don't prevent click on close button (#8838)
326+ // Focusing a dialog that is partially scrolled out of view
327+ // causes the browser to scroll it into view, preventing the click event
328+ if ( ! $ ( event . target ) . closest ( ".ui-dialog-titlebar-close" ) ) {
329+ // Dialog isn't getting focus when dragging (#8063)
330+ this . uiDialog . focus ( ) ;
331+ }
327332 }
328333 } ) ;
329334
You can’t perform that action at this time.
0 commit comments