diff --git a/packages/block-editor/src/components/writing-flow/use-arrow-nav.js b/packages/block-editor/src/components/writing-flow/use-arrow-nav.js index 41a4f67de26a60..5c0f442422554f 100644 --- a/packages/block-editor/src/components/writing-flow/use-arrow-nav.js +++ b/packages/block-editor/src/components/writing-flow/use-arrow-nav.js @@ -291,7 +291,6 @@ export default function useArrowNav() { ); if ( closestTabbable ) { - node.contentEditable = false; placeCaretAtVerticalEdge( closestTabbable, // When Alt is pressed, place the caret at the furthest @@ -312,7 +311,6 @@ export default function useArrowNav() { isReverseDir, node ); - node.contentEditable = false; placeCaretAtHorizontalEdge( closestTabbable, isReverse ); event.preventDefault(); } diff --git a/packages/block-editor/src/components/writing-flow/use-selection-observer.js b/packages/block-editor/src/components/writing-flow/use-selection-observer.js index 824e01d07358b7..572d6611d03451 100644 --- a/packages/block-editor/src/components/writing-flow/use-selection-observer.js +++ b/packages/block-editor/src/components/writing-flow/use-selection-observer.js @@ -113,6 +113,7 @@ export default function useSelectionObserver() { const selection = defaultView.getSelection(); if ( ! selection.rangeCount ) { + setContentEditableWrapper( node, false ); return; } @@ -123,6 +124,7 @@ export default function useSelectionObserver() { ! node.contains( startNode ) || ! node.contains( endNode ) ) { + setContentEditableWrapper( node, false ); return; }