Skip to content

fix(inline-toolbar): preserve popover during selection refresh - #3027

Open
Sawtone wants to merge 1 commit into
codex-team:nextfrom
Sawtone:fix/inline-toolbar-2822
Open

Sawtone wants to merge 1 commit into
codex-team:nextfrom
Sawtone:fix/inline-toolbar-2822

Conversation

@Sawtone

@Sawtone Sawtone commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Related to #2822.

This fix keeps the open inline-toolbar container mounted during selection refreshes, preventing flicker and repeated entrance animations. Tools and buttons are still recreated, preserving existing cleanup, including link handling. It also handles positioning, pending interactions, stale renders, and cleanup after render failures.

Validation

13/13 new and 54/54 existing related Cypress cases passed, plus 13/13 checks each in Chromium, Firefox, and WebKit. ESLint reports no errors; TypeScript has the same 719 baseline diagnostics. Tests loaded source through Vite; no distribution build or full local CI run was performed.

Flipper

The unchanged keyboard-navigation test failed in earlier runs on both unmodified v2.31.7 and the earlier prototype. Its 100ms wait can race the 180ms selection debounce, leaving currentBlock undefined; two retries did not consistently resolve it. Flipper remains untouched and was excluded from the final selected run.

More

Retaining tool/button instances could be a separate follow-up.

@Sawtone
Sawtone force-pushed the fix/inline-toolbar-2822 branch from 5ec0d41 to 3a0c212 Compare September 18, 2026 09:11
@Sawtone

Sawtone commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated the regression test for Firefox 115, where formatting an entire text node may not emit selectionchange. The test now explicitly triggers that event after applying/removing bold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant