Blur event isn't triggered when it should with an input date
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: calixte, Assigned: ayeddi)
References
Details
Attachments
(2 files)
STR:
- open the html;
- click on the calendar: a blur is triggered but that's fine the
relatedTargetis null, hence I can guess this isn't a "real" blur and once I click on a day the input gets back the focus; - now click on the calendar, click on the "Month - Year" button, select a year and click somewhere on the screen: the input doesn't have the focus anymore and I've no way to guess that the edition is finished.
When the user clicks outside of the "Month - Year" panel, this panel should be hidden and the input should gets back the focus.
Ideally, I think that no blur should be triggered when we're somewhere in the input UI.
I use the blur event to know that the edition is finished and then I can trigger some validations.
Comment 1•3 years ago
|
||
Why doesn't the change or input event fit your use case?
| Reporter | ||
Comment 2•3 years ago
|
||
The scenario is the following:
- when a field is not focused it's a text input containing a formatted value
- when the field is focused, its type is changed to be a date and then the edition begins
- on each
beforeinputan event is triggered to validate the potential input - when the edition is finished (because of a blur for example):
- an event is triggered in the pdf sandbox with the data to validate/format
- the input is changed to text
- the value is changed depending on the format action in the pdf (it can be used to display a date in the US format even if the user uses an other format).
So this bug causes two problems:
- I can't change the type of the input once the user dismissed the "Month - Year" ui.
- I can't trigger a specific event to "tell" that the edition is finished (it's required in the PDF specifications).
As far as I can tell, input event only tells me that something has changed.
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
•
|
||
Linked the bug 1812041: blur event is fired when picker is open
| Assignee | ||
Comment 4•3 years ago
|
||
Adding tests for the <input type=date> focus handling after a month-year picker panel is opened from the datepicker, the value is changed, and the panel is dismissed. We want to make sure that the input does not blur until the other input is actually focused (and the datepicker is closed).
Depends on D167698
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•3 years ago
|
||
| bugherder | ||
Comment 7•3 years ago
|
||
The patch landed in nightly and beta is affected.
:ayeddi, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox111towontfix.
For more information, please visit auto_nag documentation.
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•