Skip to content

Commit

Permalink
fix: ensure Post fields have focus when typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Arukuen committed Dec 16, 2024
1 parent 81f1002 commit dce67c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/block/posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ const Edit = props => {
version: VERSION,
} )

// Ensure Post fields have focus when typing
// eslint-disable-next-line @wordpress/no-global-active-element
const focusedField = document.activeElement
setTimeout( () => {
focusedField?.focus()
} )

return (
<>
<InspectorControls
Expand Down

0 comments on commit dce67c2

Please sign in to comment.