https://bugs.documentfoundation.org/show_bug.cgi?id=164492

--- Comment #14 from Eyal Rozenberg <[email protected]> ---
(In reply to Jonathan Clark from comment #13)
> Suppose I put the cursor in the middle of an Arabic word and toggle between
> English and Arabic layouts. What directions should the caret point?
>
> Currently, the caret reflects the direction of the word at that position. By
> the above, though, I should expect the direction of the caret to change,
> since I've demonstrated intent to insert English text inside of the Arabic
> word.
> 
> What if I'm in an English layout and use the arrow keys to advance through
> an Arabic document? I could insert an English character at any time. Should
> the direction follow the text, or the predicted most-likely direction of my
> input device?

The predicated most-likely direction of the input device. The text's direction
is, typically, self-evident when looking at the area surrounding the cursor;
you're reading the text, after all. But the direction of the character you're
going to type is _not_ known, or predictable, when your eyes are on the area of
the text where the cursor is; you would need to look for the visual indicator
(if one exists) at the corner of the screen.

> Should we worry about U+202E RIGHT-TO-LEFT OVERRIDE, etc.?

If we decide to follow the keyboard layout, then - No.

> The current direction indicator may not say exactly what users would want it
> to say, but it's predictable and very easy to explain. I see the vision, but
> it seems like it would be difficult to design this ER in a way that doesn't
> cause more head scratching.

1. It is not easy to explain, nor predict, because it requires the
understanding of which character is considered the one before the cursor. And
that gets quite hairy exactly in those cases which this approach - i.e. caret
direction follows previous char direction - is non-trivial.
2. That criterion is almost irrelevant as a comparison criterion. After all,
the most easy to explain and predictable thing is not to have a caret direction
at all. Perfect prediction, and nothing to explain.
3. If we choose caret direction by keyboard layout is quite predictable and
easy to explain: RTL language keyboard layout - caret points left; LTR language
keyboard layout - caret points right. Easy peasy.

By the way, another example is text areas in Mozilla Thunderrbird. Just try it
here on Bugzilla, when  editing your comment! Add an RTL keyboard layout, and a
switch key combination, and start typing. 

> I'm not sure how much it matters for this discussion, but the lowest common
> denominator is using a US-layout keyboard with an IME framework that doesn't
> announce/associate languages with input methods. On these platforms, we may
> have no way of knowing a user is even able to type Han characters until it's
> already happened, and even then we still have no reliable way of knowing
> which language it's supposed to be.

In that case - a no-direction caret is what I'd expect.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to