Search and Top Navigation
#5011 closed bug (fixed)
Opened December 17, 2009 06:53PM UTC
Closed January 13, 2010 08:34AM UTC
DatePicker Check External Click bug
Reported by: | jeffgran | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8 |
Component: | ui.datepicker | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I found a bug where the date picker will sometimes close (because of an external click) even if you clicked within the date picker. I found a solution that fixed it for me.
In the datepicker's _checkExternalClick function, I changed the line:
if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
to:
if (($target.parents().andSelf().filter('#' + $.datepicker._mainDivId).length == 0) &&
It was only checking if the click targets parents were the datepicker, not if you click directly on the date picker div itself.
This could probably use .closest().