This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(selection): Returns previous selection if either leaf is null (#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 #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: #2189 Reviewed By: kedromelon Differential Revision: D17504999 Pulled By: claudiopro fbshipit-source-id: dbd2180cf5c1af5bbe1c2b94c50767c58f524dcf
- Loading branch information