Closed Bug 454835 Opened 13 years ago Closed 13 years ago

Highlighted text on the second line of a textarea causes cursor to appear at end of textarea when you cursor down a line

Categories

(Core :: DOM: Selection, defect)

1.9.0 Branch
x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 256989

People

(Reporter: jayden, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

If you have highlighted text which appears in a textarea on the second line and your cursor in the textarea is on the first line if you move the cursor down a line so it should appear at the beginning of the highlighted second line it will jump to the end of the textarea instead.

Reproducible: Always

Steps to Reproduce:
1. Get a textarea and type a few lines of text in it.
2. Search and find the first word at the beginning of the second line.
3. Click 'Highlight All' on the find tab.
4. Now move your cursor to the beginning of the file.
5. Now click the cursor down so you would expect it to be at the beginning of the second line.  Due to the highlighted text at the beginning of the second line it will cause the cursor to jump all the way to the end of the textarea (last line after the last character).
Actual Results:  
Instead of the cursor appearing at the beginning of the second line it jumps all the way to the end of the last character on the last line of the textarea.

Expected Results:  
Moving the cursor down even with highlighted text you would assume the cursor would be at the beginning of the next line.

Removing the highlight all is a good workaround.
What you are running into is bug 256989.

The bug as you describe is fixed on trunk by bug 263683 - the caret no longer jumps to the end of the second line. However, it still doesn't do the right thing - on trunk you just get a different wrong behaviour; bug 263683's fix just exposes a different symptom of 256989.

On a current trunk build, performing the steps to reproduce above, after highlighting the first word on the second line, and pressing the down arrow, the caret disappears. (You can type text etc to verify it is indeed positioned at the start of the second line, but you can't see it).
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Component: General → Selection
Product: Firefox → Core
QA Contact: general → selection
Resolution: --- → DUPLICATE
Version: unspecified → 1.9.0 Branch
Duplicate of bug: 256989
You need to log in before you can comment on or make changes to this bug.