[w3c/selection-api] Inconsistent selectstart event timing and prevention capability (Issue #355)

flackr created an issue (w3c/selection-api#355)

This was originally filed as a https://issues.chromium.org/40718667.

On investigation, I found two behaviors:
| Browser | Behavior |
| --- | --- |
| blink / webkit | Fired on mousedown. |
| gecko | Fired when mouse moves starting a selection range. |

I'm not sure if the [selectstart specification](https://www.w3.org/TR/selection-api/#selectstart-event) clearly indicates one behavior is correct. Regardless though, given we don't have consistency we can probably go either way. One implication of the difference is that on browsers which fire on mousedown if you call preventDefault:
* you can prevent your previous selection from changing, and
* you can prevent inserting a cursor into a contenteditable from succeeding.

What do we expect the behavior to be?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/355
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/selection-api/issues/355@github.com>

Received on Tuesday, 27 January 2026 19:23:47 UTC