From 81d2bbeefa0a0f5627807e1b948f3af12cf228e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Thu, 2 Feb 2023 14:44:14 +0200 Subject: [PATCH] Rich text: stabilise onFocus --- packages/block-editor/src/components/rich-text/index.js | 2 -- packages/block-library/src/table/edit.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 8219272ad3043a..28354c63887335 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -110,7 +110,6 @@ function RichTextWrapper( __unstableEmbedURLOnPaste, __unstableDisableFormats: disableFormats, disableLineBreaks, - unstableOnFocus, __unstableAllowPrefixTransformations, ...props }, @@ -449,7 +448,6 @@ function RichTextWrapper( props.className, 'rich-text' ) } - onFocus={ unstableOnFocus } onKeyDown={ onKeyDown } /> diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index af3d7d39900717..17a48da1ea4b1a 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -428,7 +428,7 @@ function TableEdit( { rowSpan={ rowspan } value={ content } onChange={ onChange } - unstableOnFocus={ () => { + onFocus={ () => { setSelectedCell( { sectionName: name, rowIndex, @@ -530,7 +530,7 @@ function TableEdit( { setAttributes( { caption: value } ) } // Deselect the selected table cell when the caption is focused. - unstableOnFocus={ () => setSelectedCell() } + onFocus={ () => setSelectedCell() } __unstableOnSplitAtEnd={ () => insertBlocksAfter( createBlock( getDefaultBlockName() )