Skip to content

Commit 1a69667

Browse files
DaleKocianscottgonzalez
authored andcommitted
Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog: Escape closes incorrect dialog.
1 parent 112185e commit 1a69667

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/jquery.ui.dialog.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ $.widget("ui.dialog", {
119119
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
120120
.addClass( "ui-dialog-titlebar ui-widget-header " +
121121
"ui-corner-all ui-helper-clearfix" )
122+
.bind( "mousedown", function() {
123+
// Dialog isn't getting focus when dragging (#8063)
124+
uiDialog.focus();
125+
})
122126
.prependTo( uiDialog ),
123127

124128
uiDialogTitlebarClose = $( "<a href='#'></a>" )

0 commit comments

Comments
 (0)