Closed Bug 752987 Opened 14 years ago Closed 13 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

12 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 303896

People

(Reporter: zakness, Unassigned)

Details

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();
Might be worth pointing out that it works fine if the textbox was never disabled: box.focus(); box.select(); works fine
I think this was introduced around Firefox 10
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
I can definitely confirm this bug in 19.0.2. Please fix
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.