textbox text selection not highlighted if it was focused and disabled prior to selection

RESOLVED DUPLICATE of bug 303896

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 303896
6 years ago
5 years ago

People

(Reporter: zakness@gmail.com, Unassigned)

Tracking

12 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120420145725

Steps to reproduce:

html:

<input type="text" id="box" value="some text">

js:

var box = document.getElementById('box');
box.focus();
box.disabled = true;
box.disabled = false;
box.select();



Actual results:

The text was selected, but it was not highlighted so it did not appear selected. 


Expected results:

The text should have appeared selected (should have been highlighted).

FWIW, a workaround is to blur the textbox before selection:

box.focus();
box.disabled = true;
box.disabled = false;
box.blur(); // makes it work
box.select();
(Reporter)

Comment 1

6 years ago
Might be worth pointing out that it works fine if the textbox was never disabled:

box.focus();
box.select();

works fine
(Reporter)

Comment 2

6 years ago
I think this was introduced around Firefox 10
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Comment 3

5 years ago
I can definitely confirm this bug in 19.0.2. Please fix
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 303896
You need to log in before you can comment on or make changes to this bug.