Skip to content

fix(js): skip redux toggle when opening native block inserter#487

Open
jkmassel wants to merge 1 commit intotrunkfrom
jkmassel/native-inserter-no-redux-flash
Open

fix(js): skip redux toggle when opening native block inserter#487
jkmassel wants to merge 1 commit intotrunkfrom
jkmassel/native-inserter-no-redux-flash

Conversation

@jkmassel
Copy link
Copy Markdown
Contributor

@jkmassel jkmassel commented May 4, 2026

Summary

Tapping the + button currently calls setIsInserterOpened(true) on the editor store, which momentarily renders Gutenberg's web inserter UI before the native dialog covers it — a visible flash on slower devices. Call prepareAndShowInserter() directly instead; the redux flag isn't useful when the inserter is rendered natively.

Test plan

  • On Android (or iOS), with enableNativeBlockInserter on, tap the + toolbar button
  • Native inserter dialog appears immediately, no flash of the web inserter behind it
  • The dialog still closes correctly via the X button (still goes through onToggle(false) from window.blockInserter.onClose)

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.
@github-actions github-actions Bot added the [Type] Bug An existing feature does not function as intended label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant