]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Added mousedown event handler on dialog title to focus. Fixed #8063 - Dialog...
authorDale Kocian <dale.kocian@gmail.com>
Tue, 16 Oct 2012 13:17:21 +0000 (09:17 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 16 Oct 2012 13:17:21 +0000 (09:17 -0400)
ui/jquery.ui.dialog.js

index 8593fff8543b2cd7ae92a05efd18adc2607b5ec1..d83059ade001d112af25dfad5e77885760a5d7ac 100644 (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>" )