From 6eeb7d9ef8c4c5dd85635c93cc8310647ded4316 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Thu, 15 Feb 2024 10:18:16 +0100 Subject: [PATCH] After Enter transform, skip other onEnter actions like splitting --- packages/block-editor/src/components/rich-text/index.native.js | 1 + packages/block-editor/src/components/rich-text/use-enter.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index acadfb24a7221..7739fcf357c90 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -316,6 +316,7 @@ export function RichTextWrapper( transformation.transform( { content: value.text } ), ] ); __unstableMarkAutomaticChange(); + return; } } diff --git a/packages/block-editor/src/components/rich-text/use-enter.js b/packages/block-editor/src/components/rich-text/use-enter.js index 40d4f9be4759f..4daf70e7fa3c7 100644 --- a/packages/block-editor/src/components/rich-text/use-enter.js +++ b/packages/block-editor/src/components/rich-text/use-enter.js @@ -61,6 +61,7 @@ export function useEnter( props ) { } ), ] ); __unstableMarkAutomaticChange(); + return; } }