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 21:11:22 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1105062106230.25791@ps20323.dreamhostps.com>
On Fri, 6 May 2011, Aryeh Gregor wrote:
> On Tue, May 3, 2011 at 7:49 PM, Ian Hickson <ian at hixie.ch> wrote:
> > I've added selectionDirection = 'forward'/'backward'/'none'. ('none' is
> > the default selection direction on Mac OS.)
> 
> What does "none" mean?

All three values have platform specific meanings (e.g. 'forward' means 
something different on Mac, Windows, and, say, Emacs).

On Mac, 'none' is the value that represents the state of a selection after 
you've made the selection by mouse, before the user has set its direction 
by keyboard.

On Windows (and Emacs!), 'none' is not a supported state.


> If the user hits the right arrow key, does the cursor move to the right 
> of the last character of the selection or the first?

On Mac, the answer to that question does not depend on the direction. (In 
all three cases, the selection is removed and the cursor reappears at the 
end of the seleciton, i.e. to the right of the last character of the 
selection, regardless of the mode.)


> What should UAs do on platforms that don't support the concept
> of a "none" direction (assuming there are such)?

I believe the specification defines that case. (Essentially, it defaults 
to 'forward' instead.)


> This is also inconsistent with Selection, which has only two directions.  

Two directions is not sufficient to model the Mac selection state, so we 
should probably fix that.

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:33 UTC