Skip to content

Commit

Permalink
Dialog: Added mousedown event handler on dialog title to focus. Fixed…
Browse files Browse the repository at this point in the history
… #8063 - Dialog: Escape closes incorrect dialog.
  • Loading branch information
DaleKocian authored and scottgonzalez committed Oct 16, 2012
1 parent 112185e commit 1a69667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/jquery.ui.dialog.js
Expand Up @@ -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>" )
Expand Down

1 comment on commit 1a69667

@jzaefferer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaleKocian Dale, could you sign our CLA? http://jquery.github.com/cla.html Thanks.

Please sign in to comment.