From: Dale Kocian Date: Tue, 16 Oct 2012 13:17:21 +0000 (-0400) Subject: Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog... X-Git-Tag: 1.9.1~50 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a696678878f48748912b4c9d5df6da91c760b98;p=jquery-ui.git Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog: Escape closes incorrect dialog. --- diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 8593fff85..d83059ade 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -119,6 +119,10 @@ $.widget("ui.dialog", { uiDialogTitlebar = ( this.uiDialogTitlebar = $( "
" ) ) .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 = $( "" )