- From: Ryosuke Niwa <rniwa@webkit.org>
- Date: Wed, 15 Jun 2011 18:55:14 -0700
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 [1]. 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 [2]. 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: vertical-rl. - Ryosuke [1] "selection.modify behavior across platforms" ( http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-March/031000.html) [2] "keyboard events created with DOM have keyCode and charCode of 0; thus they aren't handled correctly internally" https://bugs.webkit.org/show_bug.cgi?id=16735
Received on Wednesday, 15 June 2011 18:55:14 UTC