From c53198c2099d25e80887c86af6d0e624414cc2f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 25 Jan 2013 08:51:13 -0500 Subject: [PATCH] Dialog: Allow interaction with datepickers from modal dialogs. Fixes #8989 - Dialog: Cannot change month/year in datepicker within modal. --- ui/jquery.ui.dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index bfe37235e..1d3a7a88f 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -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(); -- 2.39.5