question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`onSelectionChange` event

See original GitHub issue

The onSelect event does not fire while the user is dragging the mouse, only after they release. It would be nice to have an event that fired immediately whenever the selection changed, including while dragging the mouse. This is useful, for example, when syncing selections between multiple collaborators, ala google docs.

The native selectionchange event is supported cross browser, way back in IE, Chrome, and Safari, and recently in Firefox 43. Is this something React could polyfill and expose to components?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:28
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

28reactions
ianstormtaylorcommented, Apr 1, 2021

Still not stale…

12reactions
flarniecommented, Oct 11, 2017

I’d like to look into this because it could affect Draft.js. Will post more when I get time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTMLInputElement: selectionchange event - Web APIs | MDN
The selectionchange event of the Selection API is fired when the text selection within an <input> element is changed.
Read more >
HTML5 event for `onselectionchange` - Stack Overflow
The onchange event occurs when the value of an element has been changed. For radiobuttons and checkboxes, the onchange event occurs when the ......
Read more >
onselectionchange event | selectionchange event JavaScript
Occurs when the selection in the document has changed. To get the current selection within the document, use the selection object in Internet...
Read more >
onselectionchange event (Windows) - Microsoft Learn
Fires when the selection state of a document changes. Syntax. HTML Attribute, <element onselectionchange = "handler(event)">. Event Property ...
Read more >
OnSelectionChange Event | TestComplete Documentation
The OnSelectionChange event occurs when the user does something to change the list displayed in the dialog. This can include opening the file-selection ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found