From 5dec7e81ecece16b4f61e4f343a4ea031f761068 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Mon, 4 May 2026 11:55:04 -0600 Subject: [PATCH] fix(js): skip redux toggle when opening native block inserter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tapping the `+` button currently calls `setIsInserterOpened(true)` in the editor store, which momentarily renders Gutenberg's web inserter before the native dialog covers it — visible as a flash on slower devices. Call `prepareAndShowInserter()` directly instead; the redux flag isn't useful when the inserter is rendered natively. --- src/components/native-inserter/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/native-inserter/index.jsx b/src/components/native-inserter/index.jsx index c651436c..44d99245 100644 --- a/src/components/native-inserter/index.jsx +++ b/src/components/native-inserter/index.jsx @@ -424,7 +424,11 @@ export default function NativeBlockInserterButton( { open, onToggle } ) { title={ __( 'Add block' ) } icon={ plus } onClick={ () => { - onToggle( true ); + // Skip the redux toggle and present the native inserter + // directly. Flipping `isInserterOpened` in editorStore would + // briefly render Gutenberg's web inserter behind the native + // dialog before it covers, causing a visible flash. + prepareAndShowInserter(); } } onMouseDown={ ( e ) => { e.preventDefault();