[whatwg] getSelection().modify() in vertical writing modes
rniwa at webkit.org
Wed Jun 15 18:55:14 PDT 2011
On Wed, Jun 15, 2011 at 5:50 PM, Justin Garcia <justin.garcia at apple.com>wrote:
> I think using a Selection object method to emulate arrows keys is strange.
The use case of getSelection().modify() is still unclear .
Why not provide a general way to emulate the arrow keys if we think that's
> useful–if the focused area is an editable document, then those events can
> result in selection changes.
I guess developers already have a way of emulating arrow keys by sending
keydown/keypress events. It's just that WebKit's implementation is broken
It seems like maintaining the semantics of 'character' and 'line' is the way
to go then. i.e. modify('move', 'right', character') moves caret visually
downwards and modify('move', 'right', 'line') moves caret visually to the
left (to the next line) in LTR text in a block with writing-mode:
 "selection.modify behavior across platforms" (
 "keyboard events created with DOM have keyCode and charCode of 0; thus
they aren't handled correctly internally"
More information about the whatwg