Caret at line boundary visually appears at non-boundary in mixed bidi context
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: saschanaz, Unassigned)
Details
Attachments
(2 files)
- Open the attachment
- See where the caret is
- Click the button
- See where the caret goes
Intuitive: It should be visually at the leftmost position, as in Blink/WebKit
Actual: It appears at somewhere between visual boundaries, which is logically still correct but unintuitive and is web-visible via Selection.modify
Reporter | ||
Comment 1•5 years ago
|
||
This is the RTL version of the repro. That said, I'm only familiar with LTR language so I need some opinions from RTL users.
Hi Bashar, could you open this attachment and share your thought? What do you expect when a right-to-left sentence starts with a left-to-right word? Should the caret be at the visually rightmost position or at the start position of the first word, if you put the caret at the "start position of the sentence"?
Reporter | ||
Comment 2•5 years ago
|
||
Hello Itiel, I heard you also might have some good opinion. Could you see comment #1 and share your idea? Thanks!
Comment 3•5 years ago
|
||
Hey Kagami,
I would expect the caret to be at the visually rightmost position.
I noticed an interesting behavior however:
- When the caret reaches the beginning of the line by "Cmd-Arrow", and you start typing, insertion happens at the beginning of "Hello", ie at the "H" character.
- When the caret reaches the beginning of the line by single-character movement hitting "Arrow", insertion happens at the end of "Hello", ie at the "o" character.
I think #2 is the right behavior. Insertion needs to happen where the caret visually is at that point. I'm not sure if this is related to this bug.
Thank you very much for tagging me here!
I think there's more to this than it seems...
On a Windows 10 machine where I have 2 input methods (English and Hebrew, both are opposite directionilities to each other), opening the second testcase with Hebrew as the input method, the cursor is between the Hello
and the مرحبا
. Then, clicking the button selects the first line and half of the second one.
OTOH opening the second testcase with English as the input method, the cursor is at the rightmost position and clicking the button selects both the first and second lines.
Both scenarios seem unexpected to me.
The fact that the cursor's position depends on the input method directionality is fine, I think, but in both cases I'd expect the selection to include only the first line.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Description
•