Closed Bug 328656 Opened 15 years ago Closed 15 years ago

In RTL textarea, using left arrow to move the caret from a blank line into a line starting with LTR text moves the caret to the wrong position

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: uriber, Assigned: uriber)

References

Details

(Keywords: rtl, testcase)

Attachments

(1 file, 1 obsolete file)

In an RTL textarea, if the caret is on a blank line, and the next line starts with LTR text, pressing left-arrow moves the caret to a position after the LTR text on the next line, instead of to the beginning of that line.
Similarly, if the caret is on a blank line, and the previous line ends with LTR text, pressing right-arrow moves the caret to a position before the LTR text on the previous line, instead of to the beginning of that line.

This does not affect LTR textareas.

This is (somewhat surprisingly) not a regression, at least not since Fx 1.0.

Testcase coming up.
Attached file testcase (obsolete) —
(instructions included within).
Keywords: testcase
This may be a dupe; at least I remember trying to find a fix for it in the past :)
Note also that if you place the caret on line 4 of the test case and press End and then right arrow, the caret skips completely over the following blank line.
s/right/left/ in the previous comment
(In reply to comment #3)
> Note also that if you place the caret on line 4 of the test case and press End
> and then right arrow, the caret skips completely over the following blank line.

This issue is actually related to bug 303884 (it's fixed by the first patch on that bug). I hope to get around to writing a decent patch for that bug, once the dust on bug 299065 settles a bit.
Fixing bug 303884 fixed the "right arrow to get to previous line case", and also the issue mentioned in comment #3. However the issue with using left-arrow to move from an empty line to a line starting with LTR text remains.
Summary: In RTL textarea, using left [right] arrow to move the caret from a blank line into a line starting [ending] with LTR text moves the caret to the wrong position → In RTL textarea, using left arrow to move the caret from a blank line into a line starting with LTR text moves the caret to the wrong position
Attached file testcase
The fix for bug 330815 fixed the problem for the original testcase.
However, the same problem now exists in the (less common) case where the line on the "other" side of the blank line also ends/starts with reverse-direction text.

This problem is symmetrical, i.e., it affects LTR textareas as well.

This is now similar to bug 331444, and will hopefully be fixed by fixing that bug.
Attachment #213253 - Attachment is obsolete: true
Depends on: 331444
This (both testcases) should be fixed by the checkin for bug 331444.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.