Skip to content

Commit

Permalink
Rich text: stabilise onFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 2, 2023
1 parent 05bea6d commit 81d2bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ function RichTextWrapper(
__unstableEmbedURLOnPaste,
__unstableDisableFormats: disableFormats,
disableLineBreaks,
unstableOnFocus,
__unstableAllowPrefixTransformations,
...props
},
Expand Down Expand Up @@ -449,7 +448,6 @@ function RichTextWrapper(
props.className,
'rich-text'
) }
onFocus={ unstableOnFocus }
onKeyDown={ onKeyDown }
/>
</>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ function TableEdit( {
rowSpan={ rowspan }
value={ content }
onChange={ onChange }
unstableOnFocus={ () => {
onFocus={ () => {
setSelectedCell( {
sectionName: name,
rowIndex,
Expand Down Expand Up @@ -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() )
Expand Down

0 comments on commit 81d2bbe

Please sign in to comment.