Skip to content

Commit dce67c2

Browse files
committed
fix: ensure Post fields have focus when typing
1 parent 81f1002 commit dce67c2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/block/posts/edit.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ const Edit = props => {
174174
version: VERSION,
175175
} )
176176

177+
// Ensure Post fields have focus when typing
178+
// eslint-disable-next-line @wordpress/no-global-active-element
179+
const focusedField = document.activeElement
180+
setTimeout( () => {
181+
focusedField?.focus()
182+
} )
183+
177184
return (
178185
<>
179186
<InspectorControls

0 commit comments

Comments
 (0)