Skip to content

fix(editor): stack EditorPopover above sticky editor toolbar (#1672) - #1680

Open
MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/markdoc-insert-menu-zindex-1672
Open

MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/markdoc-insert-menu-zindex-1672

Conversation

@MilindChatrabhuji

Copy link
Copy Markdown
Contributor

Fixes #1672

Summary

When rendered inline (portal={false}, used by Markdoc's / insert menu and inline editor popovers), EditorPopover renders DialogElement with Floating UI position: absolute inside the same flow as the formatting toolbar. Because ToolbarWrapper sets position: sticky; z-index: 2 while DialogElement had no z-index, scrolling or opening an upward menu caused the sticky toolbar to paint over the middle of the popover.

Changes

  • Set zIndex: 3 on DialogElement in design-system/pkg/src/editor/EditorPopover.tsx, placing editor popovers above sticky editor toolbars (zIndex: 2) while staying below shell overlays (Sidebar at zIndex: 10, ToastContainer at zIndex: 100).
  • Added unit tests in design-system/pkg/src/editor/test/EditorPopover.test.tsx verifying the stacking order when portal={false} and when portaled.
  • Added a patch changeset for @keystar/ui.

Verification

  • prettier --check, eslint, and sc --noEmit pass cleanly on the repository / changed files.
  • �itest run design-system/pkg/src/editor/test/EditorPopover.test.tsx design-system/pkg/src/editor/test/EditorToolbar.test.tsx passed (2 test files, 3 tests).

@changeset-bot

changeset-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e1bab53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@keystar/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

Rich-text editor: "/" insert menu is drawn underneath the formatting toolbar

1 participant