Closed Bug 333276 Opened 19 years ago Closed 19 years ago

textarea.setSelectionRange errs when following line is empty

Categories

(Core :: DOM: Selection, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 334256

People

(Reporter: danswer, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 In a textarea if you attempt to set the selection to the beginning of the next line, and that line is empty, then the selection is sometimes set to the end of the current line. This is somehow dependent on previous navigation actions. For example, if the last act of navigation is left arrow, the caret will wind up on correctly on the next line. If it is a right arrow, then it only goes to the end of the same line. A Home seems to make it work, while a ctrl+home causes it to stay on the same line. Note that if it "doesn't work" and the caret winds up at the end of the first line, then pressing alt+n again will place the caret at the beginning of the third line. But this is expected because .selectionEnd has told us it's at the beginning of the second line so that its expected next position is at the beginning of the 3rd line. Csaba Gabor from Vienna Reproducible: Always
This is the same as bug 334256, which is now fixed (on trunk). *** This bug has been marked as a duplicate of 334256 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: