Closed Bug 1176904 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: Layout: Form Controls, defect)

38 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1057858

People

(Reporter: foobert, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

Attached file contenteditable-focus.html (obsolete) —
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.
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
Attached file more minimal example
Attachment #8625503 - Attachment is obsolete: true
Component: Untriaged → Layout
Keywords: testcase
Product: Firefox → Core
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
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: