]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Allow interaction with datepickers from modal dialogs. Fixes #8989 - Dialog...
authorScott González <scott.gonzalez@gmail.com>
Fri, 25 Jan 2013 13:51:13 +0000 (08:51 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 25 Jan 2013 13:51:13 +0000 (08:51 -0500)
ui/jquery.ui.dialog.js

index bfe37235e23768300e9777b9cdcf9ba945a45791..1d3a7a88fdf5faacae65da65bc84f2ada6a7d1c8 100644 (file)
@@ -679,7 +679,10 @@ $.widget( "ui.dialog", {
                                if ( $.ui.dialog.overlayInstances ) {
                                        this._on( this.document, {
                                                focusin: function( event ) {
-                                                       if ( !$( event.target ).closest(".ui-dialog").length ) {
+                                                       if ( !$( event.target ).closest(".ui-dialog").length &&
+                                                                       // TODO: Remove hack when datepicker implements
+                                                                       // the .ui-front logic (#8989)
+                                                                       !$( event.target ).closest(".ui-datepicker").length ) {
                                                                event.preventDefault();
                                                                $(".ui-dialog:visible:last .ui-dialog-content")
                                                                        .data("ui-dialog")._focusTabbable();