This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13952 - Specify selection change events
Summary: Specify selection change events
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Selection API (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Ryosuke Niwa
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 18:12 UTC by Aryeh Gregor
Modified: 2014-09-17 00:00 UTC (History)
6 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-29 18:12:11 UTC
There are some events already here, but AFAIK not specced: selectstart, things like that?  This needs to be researched.  Ryosuke suggested that we should add properties to the events that tell you what sort of user action prompted the selection change, if any.  Presumably those should be based on the Selection.modify keywords.
Comment 1 Aryeh Gregor 2011-09-22 19:31:25 UTC
Moving Selection-related bugs to editing: see bug 14248, bug 14252.
Comment 2 Ryosuke Niwa 2012-05-02 16:26:19 UTC
We should at least spec selectstart and selectionchange events. At least IE and WebKit implement both events.
Comment 3 Munawwar 2013-01-27 14:10:28 UTC
I could use selectionchange event on a contenteditable div to prevent users from selecting images when selecting text (by manually splitting the selection into two ranges). (OR an alternative solution for this specific case is having some css property that could help me achieve this)

Note: user-select:none does not help if user starts his selection before the image/wrapper div.
Also note, using window.getSelection on mousemove does not always give the most recent selection (I am guessing that selection is updated after mousemove?)
Comment 4 Ben Peters 2014-04-21 21:13:49 UTC
Moving to Selection API component.