Extra blur event when showing and focusing <input type="number"> from Javascript

RESOLVED DUPLICATE of bug 1057858

Status

()

RESOLVED DUPLICATE of bug 1057858
3 years ago
3 years ago

People

(Reporter: foobert, Unassigned)

Tracking

({testcase})

38 Branch
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

523 bytes, text/html
Details
(Reporter)

Description

3 years ago
Created attachment 8625503 [details]
contenteditable-focus.html

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

Steps to reproduce:

Focusing another element inside the focus handler of a contenteditable element.

See attached example.


Actual results:

A blur event was raised on the focused element _before_ the focus event was raised.


Expected results:

The blur event for the inner element should not be raised.
(Reporter)

Comment 1

3 years ago
I debugged this issue further and was able to reproduce this with a more minimal example. It has nothing to do with contenteditable but rather it seems that making an input element visible (which was previously display: none) and focusing it via focus() triggers the blur event.

This only happens if the input is of type number.

I've attached an additional example file which shows this.
Summary: Extra blur event when focusing from contenteditable element → Extra blur event when showing and focusing element from Javascript
(Reporter)

Comment 2

3 years ago
Created attachment 8625754 [details]
more minimal example
Attachment #8625503 - Attachment is obsolete: true

Updated

3 years ago
Component: Untriaged → Layout
Keywords: testcase
Product: Firefox → Core

Updated

3 years ago
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Form Controls
Ever confirmed: true
Summary: Extra blur event when showing and focusing element from Javascript → Extra blur event when showing and focusing <input type="number"> from Javascript
Essentially this is bug 1057858.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1057858
You need to log in before you can comment on or make changes to this bug.