w3c / i18n-issues

A place to log problems encountered when developing web sites and pages for international use.
3 stars 2 forks source link

The caret movement by hitting arrow keys need to be corrected and unified on different browsers. #5

Open r12a opened 6 years ago

r12a commented 6 years ago

[moving this here from the mlreq repo, since it relates to brower problems and more than one script.] [Raised by @aronsoyol]

Please refer to the following URL that includes a contenteditable div in vertical writing mode.

https://aronsoyol.github.io/caret_test/

The caret movement by hitting arrow keys behaves incorrectly on Chrome and Edge. It behaves correctly on the FireFox only.

xfq commented 6 years ago
Richard57 commented 6 years ago

I see no bug. The claim is that the 'left', 'right', 'up' and 'down' arrows mean to move in those directions. What most browsers are implementing is 'left' = 'go to previous unit', 'right' = 'go to next unit', 'up' = 'previous line', 'down' = 'next line'. This can even be indisputably more useful if one cannot otherwise tell whether the left-to-right text on the left precedes the right-to-left text on the right.

If these have to be directional commands, then Firefox has the fault that hitting the 'left' key when at the start of a line of horizontal left-to-right moves the cursor up a bit and a long way right!

Now, what of horizontal motion through Arabic لمد (LAM, MEEM, DAL) where the rightmost ink is often part of MEEM? (The presentation form U+FCCC ARABIC LIGATURE LAM WITH MEEM INITIAL FORM ﳌ is likely to display this effect.) Should stepping through it with the left arrow key go MEEM, LAM, DAL when using certain fonts? Is the rarely-implemented ability to step through text character-by-character (as in SIL's split cursor) to be prohibited? (Remember that phonetic/logical and visual order may be locally discordant in Indic scripts.)

What about stepping through text default grapheme cluster by default grapheme cluster when some grapheme clusters are not valid text? The text of GC1 can be wider than that of GC1+GC2 if a dotted circle is added to GC1 to indicate that it is not fully valid text. (A good example of that is a dangling invisible stacker as in SE Asian scripts.) Stepping through such text grapheme cluster by grapheme cluster within a line does not move the cursor in a uniform direction. Indeed, the Arabic lam-alif ligature can be narrower than lam.

Finally, what about 'delete' and 'rubout'. Should the item deleted be defined by 'before/after' or 'left/right'? (Or is this situation forced by the lack of 'delete above' and 'delete below' buttons?)