Closed Bug 1272474 Opened 4 years ago Closed 4 years ago

input[type="number"] focus triggered by click on element padding triggers change event

Categories

(Core :: DOM: Events, defect)

46 Branch
x86_64
macOS
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1268556

People

(Reporter: emilxeriksen, Unassigned)

References

()

Details

(Whiteboard: btpp-followup-2016-05-27)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36

Steps to reproduce:

If a number input is focused by clicking on the padding of the element a change event is fired. If the input is focused by clicking on the content part of the input no change event is fired. If the input has previously been focused by clicking on the padding and it's blurred then focused again by clicking on the padding the change event isn't fired again. This doesn't happen with a text input.

See this fiddle: https://jsfiddle.net/2fdn5dbh/4/
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
I'd say it's a dupe of bug 1268556.

Jessica, what do you think about?
Component: Untriaged → DOM: Events
Flags: needinfo?(jjong)
Product: Firefox → Core
Hmm.. I can't say for now.
Does this happen only on the first time the page is loaded? Cause If I click on the content area of the number control to get focus, then I focus on the text control, then click on the padding area of the number control to get focus, change event is not fired.
(In reply to Jessica Jong [:jessica] from comment #2)
> Hmm.. I can't say for now.
> Does this happen only on the first time the page is loaded? Cause If I click
> on the content area of the number control to get focus, then I focus on the
> text control, then click on the padding area of the number control to get
> focus, change event is not fired.

Yes, that is what I meant by "If the input has previously been focused by clicking on the padding and it's blurred then focused again by clicking on the padding the change event isn't fired again" :)
(In reply to emilxeriksen from comment #3)
> (In reply to Jessica Jong [:jessica] from comment #2)
> > Hmm.. I can't say for now.
> > Does this happen only on the first time the page is loaded? Cause If I click
> > on the content area of the number control to get focus, then I focus on the
> > text control, then click on the padding area of the number control to get
> > focus, change event is not fired.
> 
> Yes, that is what I meant by "If the input has previously been focused by
> clicking on the padding and it's blurred then focused again by clicking on
> the padding the change event isn't fired again" :)

I see. I tested with the patch on bug 1268556, no change event is fired when clicking on the padding area of the number input, so I think it's a dup. We can wait for bug 1268556 to be landed to re-confirm.
Flags: needinfo?(jjong)
Depends on: 1268556
Whiteboard: btpp-followup-2016-05-27
It's fixed now.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1268556
You need to log in before you can comment on or make changes to this bug.