Closed Bug 320874 Opened 19 years ago Closed 18 years ago

Caret moves incorrectly when pressing left-arrow to the left of LTR text at the end of an RTL textarea which is followed by LTR text, in LTR context

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: uriber, Assigned: uriber)

References

Details

(Keywords: rtl, testcase)

Attachments

(2 files, 1 obsolete file)

Just when I thought I caught them all, here's another BiDi caret bug.
I'll attach the testcase immediately.
Attached file testcase
Place the caret to the left of the "E" in "English" and press left-arrow.
Expected: Nothing should happen.
Actually: The caret moves to the right of the "h".
Keywords: testcase
Corrected summary, and attempted to make it somewhat more comprehensible.
Summary: Caret moves incorrectly when pressing left-arrow at the end of LTR text in the end of an RTL textarea followed by LTR text in LTR context → Caret moves incorrectly when pressing left-arrow to the left of LTR text in the end of an RTL textarea which is followed by LTR text, in LTR context
Attached patch patch (obsolete) — Splinter Review
Implement the "Lock In Scroll View" mechanism (from nsLeafIterator) in nsVisualIterator.
The problem was that nsVisualIterator (and thus GetFrameFromDirection) was reaching outside the textarea - leading to wrong results.
Attachment #206384 - Flags: review?(smontagu)
Status: NEW → ASSIGNED
Summary: Caret moves incorrectly when pressing left-arrow to the left of LTR text in the end of an RTL textarea which is followed by LTR text, in LTR context → Caret moves incorrectly when pressing left-arrow to the left of LTR text at the end of an RTL textarea which is followed by LTR text, in LTR context
Attached patch patch v1.1Splinter Review
Oops - I forgot to initialize mLockScroll in the constructor.
Attachment #206384 - Attachment is obsolete: true
Attachment #206392 - Flags: review?(smontagu)
Attachment #206384 - Flags: review?(smontagu)
Attachment #206384 - Flags: review+
Attachment #206384 - Flags: review+
Attachment #206392 - Flags: review?(smontagu) → review+
Attachment #206392 - Flags: superreview?(roc)
ROC, is there a reason why you haven't sr'ed this?
(In reply to comment #5)
> ROC, is there a reason why you haven't sr'ed this?

It's probably more effective to ask this when you can actually see the question :)
Attachment #206392 - Flags: superreview?(roc) → superreview+
Thanks, ROC.

Checked in:
Checking in layout/base/nsFrameTraversal.cpp;
/cvsroot/mozilla/layout/base/nsFrameTraversal.cpp,v  <--  nsFrameTraversal.cpp
new revision: 3.50; previous revision: 3.49
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
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.

Attachment

General

Creator:
Created:
Updated:
Size: