From c964894b9b75dc7df62660725967a1f7a526a3ec Mon Sep 17 00:00:00 2001
From: Scott González <scott.gonzalez@gmail.com>
Date: Wed, 8 Feb 2012 13:42:55 -0500
Subject: Datepicker: Allow descendant elements in triggers. Fixes #8107 -
 Closing the datepicker via the provided button does not work in Chrome when
 the button contains other non-text elements.

---
 ui/jquery.ui.datepicker.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/jquery.ui.datepicker.js')

diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 5915d4027..034ad774e 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -849,7 +849,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();
-- 
cgit v1.2.3