From 46d6472da2d354e20462320d10d9390311133eb5 Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Fri, 1 Jul 2022 10:34:15 +0100 Subject: [PATCH] Revert "[RN Mobile] RichText: Return early when content has changed in onSelectionChangeFromAztec (#41682)" This reverts commit 86ded7cab0a2f263c661cbfa90a75a232f47b7e0. --- packages/react-native-editor/CHANGELOG.md | 1 - packages/rich-text/src/component/index.native.js | 9 --------- 2 files changed, 10 deletions(-) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 0923f84f9bb0a..cd464e5021adf 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,7 +13,6 @@ For each user feature we should also add a importance categorization label to i - [*] Add 'Insert from URL' option to Video block [#41493] - [*] Image block copies the alt text from the media library when selecting an item [#41839] -- [**] RichText - Improve performance by dropping events during quick typing [#41682] ## 1.78.1 diff --git a/packages/rich-text/src/component/index.native.js b/packages/rich-text/src/component/index.native.js index 1688c0703403f..ce6ae2327cf69 100644 --- a/packages/rich-text/src/component/index.native.js +++ b/packages/rich-text/src/component/index.native.js @@ -657,15 +657,6 @@ export class RichText extends Component { return; } - // Check for and discard events during quick typing. Updating the selection during quick typing isn't - // necessary and can cause UI lags. (see https://github.com/WordPress/gutenberg/pull/41682.) - if ( - contentWithoutRootTag !== this.value && - this.lastAztecEventType === 'selection change' - ) { - return; - } - this.comesFromAztec = true; this.firedAfterTextChanged = true; // Selection change event always fires after the fact.