[whatwg] Control over selection direction
Ian Hickson
ian at hixie.ch
Fri May 6 14:11:22 PDT 2011
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. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list