Ticket #3858 (closed bug: fixed)
DatePicker not hiding consitently on external click
| Reported by: | redsquare | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.7 |
| Component: | ui.datepicker | Version: | 1.6rc5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
http://groups.google.com/group/jquery-ui/browse_thread/thread/b3f10cb1d15b03e7
I have noticed when the datepicker is shown and I click outside of the document it does not invoke the document.body click. If I change the if block starting on line 7362 (full unminified jquery- ui-personalized-1.6rc4.js) to the following it works much better. I assume this is because I click outside the document body but still within the document (widescreen etc)
if (!$.datepicker.initialized){
$(document)
.mousedown($.datepicker._checkExternalClick) .find('body') .append($.datepicker.dpDiv);
$.datepicker.initialized = true;
}
original
if (!$.datepicker.initialized) {
$(document.body).append($.datepicker.dpDiv).
mousedown($.datepicker._checkExternalClick);
$.datepicker.initialized = true;
}

