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

[whatwg] Selection events in editable content

From: Tim Down <timdown@gmail.com>
Date: Tue, 10 May 2011 16:55:48 +0100
Message-ID: <BANLkTinPtJiVRMfSn1v+HVt+qp5tXGsi9A@mail.gmail.com>
On 10 May 2011 16:42, Ryosuke Niwa <rniwa at webkit.org> wrote:
> On Tue, May 10, 2011 at 8:33 AM, Ojan Vafai <ojan at chromium.org> wrote:
>> What's the difference between selectstart and selectionchange in WebKit?
>> In IE is this case the only difference between the two?
> selectstart fires before selection changes, it bubbles, and it's cancelable.
> ?So it's very useful if you want to prevent selection. ?But the event isn't
> useful as much as it could be because it doesn't tell you what new selection
> is so we might want to consider adding new property like newSelectionRanges
> that tells you what new selection will be.
> - Ryosuke

newSelectionRanges on its own wouldn't be as useful as possible, since
it tells you nothing about the selection direction. You could cover
this by adding newSelectionFocusNode, newSelectionFocusOffset,
newSelectionAnchorNode and newSelectionAnchorOffset as well.

Received on Tuesday, 10 May 2011 08:55:48 UTC

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