Open Bug 1030720 Opened 11 years ago Updated 3 years ago

Input loses focus after changing type attribute

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: krzyzak, Unassigned)

Details

Attachments

(1 file)

Attached file bug.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release) Build ID: 20140605174243 Steps to reproduce: Render input with type attribute set to text: <input id="input1" type="text" name="test" value="10" /> Change it's type to number: var input = window.document.getElementById('input1'); input.addEventListener('focus', function() { this.type = 'number'; }); Firefox 30, OSX Mavericks 10.9.3 Actual results: When I press keyboard buttons nothing happens (I should be able to add numbers into input). I guess input is blurred, but no blur event is triggered. Expected results: When I press keyboard buttons text should appear inside input. Also blur event shouldn't happen and input should keep focus after changing it's type. Open bug.html, focus input - when you press keyboard buttons nothing happens.
Component: Untriaged → DOM: Events
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
Version: 30 Branch → Trunk
Component: DOM: Events → Event Handling
Component: Event Handling → User events and focus handling
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: