Opened 11 years ago
Last modified 6 years ago
#9125 open bug
Datepicker reopens if focused after selecting a date in IE
Reported by: | po_taka | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Browsers affect: IE9
Datepicker appear immediately after date is selected
Change History (16)
comment:1 Changed 11 years ago by
Component: | ui.datepicker → ui.dialog |
---|---|
Description: | modified (diff) |
Status: | new → open |
Summary: | Dapicker not hiding → Dialog: Datepicker reopens after selecting a date inside a modal dialog in IE9 |
comment:2 Changed 11 years ago by
The bug occurs in IE 7 - 10 and does not occur in Firefox/Chrome/Safari/Opera. Possibly related to #5419.
comment:3 Changed 11 years ago by
Summary: | Dialog: Datepicker reopens after selecting a date inside a modal dialog in IE9 → Dialog: Datepicker reopens after selecting a date inside a modal dialog in IE |
---|
comment:4 Changed 10 years ago by
In the datepicker rewrite we changed the datepicker to move the focus back to the text input after selecting a date. So the issue here, where focus ends up on the input again, wouldn't be an issue anymore, as it would happen consistently in all browsers, without reopening the datepicker.
Which doesn't explain this issue, but I feel like its not worth investing the time to find the source of the issue if it only occurs with the current datepicker. It would be different if it was reproducible with something else.
comment:5 Changed 10 years ago by
The issue, I believe is that focus is set on the first input. If this is a datepicker, it will open because the datepicker is set to open on focus. This is easily proven by comparing these two jsFiddles:
http://jsfiddle.net/aub9e/ - this one has an input before the datepicker. After selecting a date, you can see the focus is put on the first input.
http://jsfiddle.net/aub9e/1/ - here, the datepicker is the first input, so when it gets focus after selecting a date, the datepicker is reopened.
In Chrome, nothing gets focus after selecting a date, so no problem occurs. This can, however, be avoided by putting the autofocus on a certain other element (just adding 'autofocus' inside a tag, for example a button in the dialog).
comment:10 Changed 9 years ago by
Component: | ui.dialog → ui.datepicker |
---|---|
Summary: | Dialog: Datepicker reopens after selecting a date inside a modal dialog in IE → Datepicker reopens if focused after selecting a date in IE |
comment:13 Changed 8 years ago by
Still an issue in 1.11.0 as demonstrated by the following fiddle:
http://jsfiddle.net/senyahnoj/4nhu9ss6/
Interestingly the same scenario in 1.9.1 posted by jasonaroo (comment 6) doesn't show this behaviour.
I'm testing on IE11
comment:14 Changed 8 years ago by
comment:16 Changed 6 years ago by
I tried the focus fix, but it does not work for me. How to resolve this issue?
reduced: http://jsfiddle.net/R9AT2/1/