problems with focus and highlighting text when an input's blur destroys the input




12 years ago
9 years ago


(Reporter: michael.hixson, Unassigned)


2.0 Branch
Windows Server 2003

Firefox Tracking Flags

(Not tracked)



(1 attachment)



12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv: Gecko/20070713 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv: Gecko/20070713 Firefox/

A text input box whose onblur handler destroys the input causes unexpected behavior in Firefox.  Let's say you have two input boxes, input1 and input2, and input1.blur() destroys input1.  If you click on input1, then click on input2, input2 does not gain focus.  Also, you cannot tab from input1 to input2.  Strangely, if you click on input1 then click and drag on the text in input2 to highlight it, you can, although input2 will not gain focus.  In fact, if input1.blur() recreates input1, you can do this multiple times and highlight disjointed bits of text in multiple input boxes at the same time.  

Reproducible: Always

Steps to Reproduce:
1. Load the attached html in Firefox.
2. Hold down the tab button.

1. Load the attached html in Firefox.
2. Click on the first input box.
3. Click and drag over some of the text in a different input box to highlight some of the characters.
4. Click on the first input box again.
4. Highlight some text in a different input box.
Actual Results:  
The first input box repeatedly gains focus and the other input boxes never gain focus.

The other input boxes do not gain focus when you click on them and the text you highlighted remains highlighted even as you highlight other text in the document.

Expected Results:  
The input boxes should gain focus in the order that they appeared on the page.

Clicking on the other input boxes should give them focus the first time you click them, and the text should not remain highlighted when you highlight other text in the document.

Comment 1

12 years ago
Created attachment 274248 [details]
A simple layout that demonstrates the problem

Comment 2

12 years ago
Can you reproduce this in a trunk build? I'd recommend testing with a new profile.
Version: unspecified → 2.0 Branch
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME

Comment 4

9 years ago
This does work as expected in Firefox 3.6.3.
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.