W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] Control over selection direction

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 6 May 2011 22:28:35 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1105062226070.25791@ps20323.dreamhostps.com>
On Fri, 6 May 2011, Ryosuke Niwa wrote:
> On Fri, May 6, 2011 at 2:56 PM, Ian Hickson <ian at hixie.ch> wrote:
> >
> > On Windows, sure, it should default to "forward" just like the spec 
> > says. But on Mac, it should default to "none", since otherwise the 
> > behaviour is inconsistent with the platform selection behaviour.
> 
> Why is it inconsistent? DOM Selection works the same way in WebKit.  
> The only case you get non-directional selection in WebKit is if a user 
> set selection by mouse.

It's inconsistent with how selections work on Mac. Open TextEdit, type in 
the string "aouiaoueioethaoieiaoe", press Command+F, type "tha", hit 
Enter, and check to see what direction the selection is. It's not a 
forward selection, it's a default non-directional selection.

IMHO anything in the DOM API that is defaulting newly created selections 
to "'forward' is buggy, since that doesn't match the platform.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 6 May 2011 15:28:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:05 UTC