This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(selection): Returns previous selection if either leaf is null #2189
Closed
+14
−4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@claudiopro merged this pull request in fe68e43. |
jdecked
pushed a commit
to twitter-forks/draft-js
that referenced
this pull request
Oct 9, 2019
…cebookarchive#2189) Summary: **Summary** Bails out early from the `getUpdatedSelectionState` method with previous selection when `anchorLeaf` or `focusLeaf` are null to prevent an error surfaced when using a decorator for emoji inserted between two spans of text entered via IME. Thanks to robbertbrak for suggesting and cherry-picking a fix from their fork 🎉 Fixes facebookarchive#2187 **Test Plan** 1. Build Draft.js 1. Inject into jsfiddle reported by jdecked https://jsfiddle.net/36tvhmce/ 1. Try to repro issues with Pinyin and Hiragana IME 1. Verify there is no error in the console and text is entered normally Pull Request resolved: facebookarchive#2189 Reviewed By: kedromelon Differential Revision: D17504999 Pulled By: claudiopro fbshipit-source-id: dbd2180cf5c1af5bbe1c2b94c50767c58f524dcf
mmissey
pushed a commit
to mmissey/draft-js
that referenced
this pull request
Mar 24, 2020
…cebookarchive#2189) Summary: **Summary** Bails out early from the `getUpdatedSelectionState` method with previous selection when `anchorLeaf` or `focusLeaf` are null to prevent an error surfaced when using a decorator for emoji inserted between two spans of text entered via IME. Thanks to robbertbrak for suggesting and cherry-picking a fix from their fork 🎉 Fixes facebookarchive#2187 **Test Plan** 1. Build Draft.js 1. Inject into jsfiddle reported by jdecked https://jsfiddle.net/36tvhmce/ 1. Try to repro issues with Pinyin and Hiragana IME 1. Verify there is no error in the console and text is entered normally Pull Request resolved: facebookarchive#2189 Reviewed By: kedromelon Differential Revision: D17504999 Pulled By: claudiopro fbshipit-source-id: dbd2180cf5c1af5bbe1c2b94c50767c58f524dcf
alicayan008
pushed a commit
to alicayan008/draft-js
that referenced
this pull request
Jul 4, 2023
…189) Summary: **Summary** Bails out early from the `getUpdatedSelectionState` method with previous selection when `anchorLeaf` or `focusLeaf` are null to prevent an error surfaced when using a decorator for emoji inserted between two spans of text entered via IME. Thanks to robbertbrak for suggesting and cherry-picking a fix from their fork 🎉 Fixes facebookarchive/draft-js#2187 **Test Plan** 1. Build Draft.js 1. Inject into jsfiddle reported by jdecked https://jsfiddle.net/36tvhmce/ 1. Try to repro issues with Pinyin and Hiragana IME 1. Verify there is no error in the console and text is entered normally Pull Request resolved: facebookarchive/draft-js#2189 Reviewed By: kedromelon Differential Revision: D17504999 Pulled By: claudiopro fbshipit-source-id: dbd2180cf5c1af5bbe1c2b94c50767c58f524dcf
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Bails out early from the
getUpdatedSelectionState
method with previous selection whenanchorLeaf
orfocusLeaf
are null to prevent an error surfaced when using a decorator for emoji inserted between two spans of text entered via IME.Thanks to @robbertbrak for suggesting and cherry-picking a fix from their fork 🎉
Fixes #2187
Test Plan