From b85c8540624d5c85d80501a771b6c851f6dfda29 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Sun, 15 Jan 2023 18:15:42 +0900 Subject: [PATCH] In-between inserter: Fix console error when moving mouse in Firefox commit --- .../src/components/block-list/use-in-between-inserter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-editor/src/components/block-list/use-in-between-inserter.js b/packages/block-editor/src/components/block-list/use-in-between-inserter.js index 2053c8f3eb4fc9..506fc718243b0e 100644 --- a/packages/block-editor/src/components/block-list/use-in-between-inserter.js +++ b/packages/block-editor/src/components/block-list/use-in-between-inserter.js @@ -43,6 +43,11 @@ export function useInBetweenInserter() { return; } + // Ignore text nodes sometimes detected in FireFox. + if ( event.target.nodeType === event.target.TEXT_NODE ) { + return; + } + if ( isMultiSelecting() ) { return; }