Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog: Escape closes incorrect dialog.

This commit is contained in:
Dale Kocian 2012-10-16 09:17:21 -04:00 committed by Scott González
parent 112185ec8d
commit 1a69667887

View File

@ -119,6 +119,10 @@ $.widget("ui.dialog", {
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
.addClass( "ui-dialog-titlebar ui-widget-header " +
"ui-corner-all ui-helper-clearfix" )
.bind( "mousedown", function() {
// Dialog isn't getting focus when dragging (#8063)
uiDialog.focus();
})
.prependTo( uiDialog ),
uiDialogTitlebarClose = $( "<a href='#'></a>" )