Closed Bug 327653 Opened 18 years ago Closed 18 years ago

cursor positioning wrong in empty lines of textarea

Categories

(Core :: DOM: Selection, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 334256

People

(Reporter: niels_h_jensen, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 MultiZilla/1.8.1.0p SeaMonkey/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 MultiZilla/1.8.1.0p SeaMonkey/1.0

When setting the cursor position in textareas with .setSelectionRange() or .selectionStart to empty lines the cursor is positioned one character (= one line) behind the correct position.
 

Reproducible: Always

Steps to Reproduce:
1. Create textarea with empty lines
2. Try to set the cursor to the empty line with .setSelectionRange()
3. Cursor is positioned at the end of the previous line instead
4. In a block of empty lines the cursor is positioned in the previous line
Same problem in Firefox 1.5.0.1
can you attach a testcase?
Assignee: general → selection
Component: General → Selection
Product: Mozilla Application Suite → Core
QA Contact: general
Version: unspecified → 1.8 Branch
Same as bug 334256, now fixed on trunk.

*** This bug has been marked as a duplicate of 334256 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 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: