Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich text: stabilise onFocus #47685

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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