Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Making sure we don't throw when selecting text on multiple fields #2297

Conversation

fabiomcosta
Copy link
Contributor

@fabiomcosta fabiomcosta commented Jan 3, 2020

Summary

When selecting text between multiple draft-js Editor fields rendered on a page, an unexpected error happens.
This comment on the code explains why the bug happens: https://github.com/facebook/draft-js/pull/2297/files#diff-92f7a619f202063fc7fd29fcfa73c3e4R46-R50

Test Plan

I created this sandbox to more easily show the issue this PR is solving.
Follow the instructions on the sandbox to repro the issue and see the error: https://codesandbox.io/s/affectionate-rgb-64zsc

Here is what you should see:
draftjs_select_bug

@fabiomcosta
Copy link
Contributor Author

This is the same fix merged at a9fcbb2

Closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants