[whatwg] getSelection().modify() in vertical writing modes

On Mon, Jun 27, 2011 at 2:39 PM, Alexey Proskuryakov <ap at webkit.org> wrote:

> 27.06.2011, ? 14:30, Ryosuke Niwa ???????(?):
>
> FYI, I also posted this question on public-html-ig-jp at w3.org, and I got
> exactly one response from Koji, who was supportive of my proposal.
>
> Given that, I'm inclined to say that the consensus is to modify('move',
> 'left'/'right', 'character') should move the caret in the direction of
> line-left and line-right and modify('move', 'left'/'right', 'line') should
> move the caret in the block direction (left for backward direction and right
> for forward direction).  As Koji mentioned, it matches native-speaker's
> intuition and it matches the concept of left/right in text-align property.
>
> I do not think that we should ignore people who are not native speakers and
> are writing JavaScript code that works with vertical text. For most people,
> left is left, and up is up. There is no reason to make it more complicated
> than it is already.
>

There is no up! There's left, right, forward and backward. To do "up" in
horizontal text you change the granularity from 'character' to 'line'. But
you still use 'left' and 'right'. Keeping it so that 'character' selects a
character and 'line' selects a line seems like the only choice here. We're
not actually redefining what left/right mean any more than the current API
already does by having left+line mean up. It's logical left instead of
visual left.

Ojan

Received on Monday, 27 June 2011 15:33:58 UTC