[w3c/selection-api] Fire selectionchange on input/textarea elements (#141)

Closes (partially) #53, since this only covers `selectionchange` without `selectstart` because of no implementation.

This follows [the suggestion from @smaug----](https://github.com/w3c/selection-api/issues/53#issuecomment-692672383) - to bubble up from text controls to `document`, since it allows to easily detect which text control fired it.

([`document.activeElement` can be used in some cases](https://github.com/w3c/selection-api/issues/53#issuecomment-677500484) to detect the source, but it's not always useful since it can be fired without focusing, e.g. through `.setSelectionRange()`.)

The following tasks have been completed:

 * [ ] Modified Web platform tests (link to pull request) - 

Implementation commitment:

 * [ ] WebKit (https://bugs.webkit.org/show_bug.cgi?id=)
 * [ ] Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=)
 * [x] Gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=1648944)


<!--
    This comment and the below content is programatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/w3c/selection-api/pull/141.html" title="Last updated on Jun 15, 2021, 11:00 PM UTC (bc70136)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/selection-api/141/b2f91fb...bc70136.html" title="Last updated on Jun 15, 2021, 11:00 PM UTC (bc70136)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/selection-api/pull/141

-- Commit Summary --

  * Fire selectionchange on input/textarea elements

-- File Changes --

    M index.html (7)

-- Patch Links --

https://github.com/w3c/selection-api/pull/141.patch
https://github.com/w3c/selection-api/pull/141.diff

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

Received on Tuesday, 15 June 2021 23:01:27 UTC