Open Bug 616571 Opened 15 years ago Updated 4 years ago

cursor at last position not painted correctly if last character is newline

Categories

(Core :: Web Painting, defect)

x86
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: nikita.ppv, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b8pre) Gecko/20101203 Firefox/4.0b8pre Build Identifier: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b8pre) Gecko/20101203 Firefox/4.0b8pre When the selection is set after the last charater using setSelectionRange and the last character is a newline ('\n') the selection is after the last character but the cursor is displayed before the last character. Reproducible: Always Steps to Reproduce: 1. Open linked URL 2. Click into the textarea 3. Press the 'A' key Actual Results: The cursor is first displayed at offset 0. The 'A' is inserted as offset 1. Expected Results: The cursor should be displayed at offset 1.
The problem only exists with newline characters ('\n', '\r', '\r\n'). Normal characters like 'A' work fine.
Summary: cursor not painted at correct position if → cursor at last position not painted correctly if last character is newline
Component: Layout: View Rendering → Layout: Web Painting
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.