Open Bug 1421558 Opened 7 years ago Updated 2 years ago

Blur event is not fired when date is cleared using clear button for input type date

Categories

(Core :: DOM: Core & HTML, defect, P3)

57 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: parthivshah91, Unassigned)

References

Details

Attachments

(1 file)

Attached file demo - Blur.html
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce:

1. Open demo - Blur.html  in Firefox.
2. Select any date using date picker.
3. Now clear the date using X ( clear button ).
4. Click on anywhere on the page other than date control.
5. Observe "blur fired" alert is not shown.


Actual results:

When X button is clicked and user clicks anywhere on the page "blur fired" alert is not shown.


Expected results:

When X button is clicked and user clicks anywhere on the page "blur fired" alert should be shown.
Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → DOM: Core & HTML
Flags: needinfo?(jjong)
We tested on Windows, Linux Ubuntu and macOS with Nightly and v57 but could not reproduce this.
Just wanted to make sure with you that there are no other steps between step 2-4 because if the focus was not originally on the input, clicking on the X (clear button) does not gain focus for the input, so later when clicking outside of the input won't cause any blur event. But step 2 does get the focus for input, so blur event should be fired in step 4.

Could you make sure that before step 4, focus is on input? Thanks.
Flags: needinfo?(jjong) → needinfo?(parthivshah91)
Hi Jessica, 
Thank you for your reply. I am sorry I missed one step. Between step 2 and step 3 one step is missing. After filling date, Click outside. As you suggested clicking on X ( clear button ) does not gain focus for the input. That is the reason, it won't fire blur event. shouldn't clicking on X ( clear button ) gain focus for input? as datepicker in Chrome gets focus. Anyways I have a workaround for this, I can set focus on onclick event.

Thanks again.
Flags: needinfo?(parthivshah91)
This is to be consistent with our input type=number, which does not get focus when clicking on the up/down buttons either.
I'll close this bug as RESOLVED, please feel free to reopen or file another bug if you think the behavior is not acceptable, we can discuss whether the behavior should be changed. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
I think this is not consistent acceptable behavior. As up, down and clear button are part of input control so clicking on it should focus input control. For type=number there is still an open defect with bug 1012818. So I am opening it again to get it fixed.
Priority: -- → P3
See Also: → 1012818
I would like to know why it's taking so long to confirm this bug? Is there any workaround for this bug?
Any update on this issue? As this issue forces us to use custom date picker control. Let me know if you have any idea on whether and when this will be fixed?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: