aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Kocian <dale.kocian@gmail.com>2012-10-16 09:17:21 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-16 09:17:21 -0400
commit1a696678878f48748912b4c9d5df6da91c760b98 (patch)
tree62139e850f3e8c6d25e3360a73040a5a5e3bec83
parent112185ec8ddb7f0849fa40e7b1409e28153555f8 (diff)
downloadjquery-ui-1a696678878f48748912b4c9d5df6da91c760b98.tar.gz
jquery-ui-1a696678878f48748912b4c9d5df6da91c760b98.zip
Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog: Escape closes incorrect dialog.
-rw-r--r--ui/jquery.ui.dialog.js4
1 files changed, 4 insertions, 0 deletions
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 = $( "<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>" )