-
Notifications
You must be signed in to change notification settings - Fork 47.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onSelectionChange
event
#5785
Comments
Do any of the more seasoned contributors have any opinions on what this should look like? Should it just become a feature of It seems like the current React |
Seems reasonable to me to mirror the browser API. |
I'd like to look into this because it could affect Draft.js. Will post more when I get time. |
Hello @flarnie, I think there is a problem on Draft.js, This is reproducible on Draft.js home/demo page and on facebook status field. (macOS: chrome, FF and Safari) I think it is not a good solution, but for a test I added the following code on Draft.js componentDidMount: In my tests it works, but maybe you can know some unexpected effect about it. Sorry about my english! Thank you. |
@flarnie any word on this? We'd love this for Slate.js as well! FWIW, I'd propose that it just be implemented as: onSelectionChange={...}
onSelectionStart={...} Different than the existing I don't know much about React events, but if they're just pass-throughs with no complex compatibility logic, they might be fairly easy to implement? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
Not stale! This is still a pain point that's lacking in React's API. I'm not sure what the solution is since it seems like no new events are being added to React despite them being standardized? |
This will probably be a solution |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Still not stale... |
bump |
any ideas someone? : ) |
🙂
|
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?
The text was updated successfully, but these errors were encountered: