#5897 closed bug (fixed)
Datepicker: inconsistent behavior in IE when click to close month and year drop-downs
Reported by: | rdworth | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.4 |
Component: | ui.datepicker | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using a datepicker with month and year drop-downs, if you click to expand a drop-down, then click in the same place to collapse it, the focus is set back to the instance element input. Except in IE. In IE, the focus stays on the drop-down.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Summary: | Datepicker: inconsistent behavior in IE when open and close month and year drop-downs without selecting → Datepicker: inconsistent behavior in IE when click to close month and year drop-downs |
---|
comment:4 Changed 13 years ago by
Milestone: | 1.9 → 1.8.4 |
---|
comment:5 Changed 12 years ago by
Datepicker: use a setTimeout 0 so the same code can run in IE (as other browsers) to set focus back to the datepicker text input if a month or year drop-down is clicked closed. Fixes #5897 - Datepicker: inconsistent behavior in IE when click to close month and year drop-downs
Changeset: 85b8816fa9480005aedb3354714abbc1ead06897
Note: See
TracTickets for help on using
tickets.
There is a check to have this code not run in IE.
http://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js#L849
Testing shows this check is there because in IE the first click to expand the drop-down sometimes cause the drop-down to collapse immediately because focus goes from the drop-down to the text input. This can fixed by using a setTimeout 0 instead, so that IE can have the same behavior as other browsers.