Closed Bug 646382 Opened 9 years ago Closed 9 years ago
Caret moves down a line after entering a LTR character in a RTL textarea (and the opposite)
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: When typing a RTL character in a LTR textarea - the caret moves down a line, even though a second line doesn't exists. The same happens when typing a LTR character in a RTL textarea. Reproducible: Always
Component: Layout: View Rendering → Editor
QA Contact: layout.view-rendering → editor
Also, deleting the character requires 2 clicks on the backspace button - the first click does nothing.
I was able to reproduce only after explicitly setting bidi.browser.ui to true.
It looks as this bug is only reproducible when bidi.browser.ui is set to true Comment 2 is not part of this bug, and the behaviour can be changed by setting bidi.edit.delete_immediately to true (see bug 328834
Ehsan should be able to throw some light on this, since he was dealing and submitting patches to many caret issues. Bugs relevant in the range specified are: bug 607584, bug 542317, bug 542116 and bug 389321.
So, here is what's happening here. Our bidi handling code attaches the caret to the BR frame at the end of the textarea. But the BR frame is positioned 720 points below where it's supposed to be (see this frame dump for example: http://pastebin.mozilla.org/1195321) roc: do you think that's the expected place for the BR frame to show up after a reframe?
It's zero height and width, so I guess we're just placing it at the baseline, so that seems OK right?
(In reply to comment #7) > It's zero height and width, so I guess we're just placing it at the baseline, > so that seems OK right? Right, ok, just wanted to confirm. I guess we need to special case the BR frame the same way as inline frames then.
It seems to me that GetCaretBaseline and GetBaseline should normally be constrained to be within the frame's content-box. So I think a better fix might be to make nsBRFrame::GetBaseline clamp the computed baseline to the content-box.
The same might be true for inline frames.
Attachment #524798 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.