]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Allow descendant elements in triggers. Fixes #8107 - Closing the datepick...
authorScott González <scott.gonzalez@gmail.com>
Wed, 8 Feb 2012 18:42:55 +0000 (13:42 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 8 Feb 2012 18:43:34 +0000 (13:43 -0500)
(cherry picked from commit c964894b9b75dc7df62660725967a1f7a526a3ec)

ui/jquery.ui.datepicker.js

index fbf1f4c45245ed1658c49d095d3d5167fd963cfd..0b83af28950c62ee4f93ae47724349dd581ed383 100644 (file)
@@ -845,7 +845,7 @@ $.extend(Datepicker.prototype, {
                if ( ( ( $target[0].id != $.datepicker._mainDivId &&
                                $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
                                !$target.hasClass($.datepicker.markerClassName) &&
-                               !$target.hasClass($.datepicker._triggerClass) &&
+                               !$target.closest("." + $.datepicker._triggerClass).length &&
                                $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
                        ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
                        $.datepicker._hideDatepicker();