Skip to content

fix(editor): keep bubble menu styles in production builds - #3905

Merged
felipefreitag merged 4 commits into
canaryfrom
fix/editor-bubble-menu-production-styles
Nov 13, 2026
Merged

felipefreitag merged 4 commits into
canaryfrom
fix/editor-bubble-menu-production-styles

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The editor's bubble menu keeps its layout and theme again in Next.js 16.4 production builds with Turbopack. Before, the menu on the react.email homepage, and in any app on that setup, showed stacked controls with no background. The homepage menu also opened at the editor's left edge on the first selection. It now opens under the selected word.

Why not patch TipTap. #3896 patches @tiptap/react for the website only. This fix also reaches apps that use the published editor, and nothing needs removal after vercel/next.js#100477 ships in a stable release.

Gotcha. The visible menu box is now a child of TipTap's positioned element. Custom CSS that sets z-index through className also needs position. The default theme sets both.

How to reach it. Build apps/web for production with REDIS_URL set, then double-click a word in the homepage editor.

Fixes #3895


Summary by cubic

Fixes the editor bubble menu losing its layout and theme in Next.js 16.4 production builds with Turbopack. The menu previously showed stacked controls with no background and opened at the editor's left edge on the first selection; it now opens under the selected word.

  • data-re-bubble-menu, className, style, and other props now go on a wrapper element inside TipTap's positioned menu element, so React sets them instead of relying on prop sync that Turbopack drops.
  • The homepage editor scopes its full-width rule to .tiptap so the menu no longer stretches to the editor edge.
  • Custom CSS that sets z-index via className now also needs position, since those rules apply to the inner element, not the positioned one. position is included in the layout styles.

Fixes #3895.

Written for commit 709944a. Summary will update on new commits.

View guided diff

Turbopack in Next.js 16.4 drops TipTap's prop sync on the bubble menu
element in production. The menu then has no data-re-bubble-menu, so it
loses its layout and theme. Render the attribute, className, style and
other props on our own element inside TipTap's menu, so React sets them.

On the homepage, scope the full-width rule to the .tiptap element.
TipTap appends the menu as a direct child div, so the old rule made the
menu full width on first show and put it at the editor's left edge.

Fixes #3895.
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-email Ready Ready Preview Nov 13, 2026 6:06pm UTC
react-email-demo Ready Ready Preview Nov 13, 2026 6:06pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709944a

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

This PR includes changesets to release 1 package
Name Type
@react-email/editor 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

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3905

commit: 709944a

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

The TipTap mock now forwards its props like the real component, so the
test fails if Root sends className or the data attribute to TipTap
again. The comment names only the attribute and style sync, and says
when the workaround can go. The changeset says that position and
z-index rules now apply to the inner element.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

View guided diff | Re-trigger cubic

The menu's position rule now lives in bubble-menu.css, which owns its
layout and which the default theme imports. Layout-only users get it
too. Shorten the changeset entry.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

View guided diff | Re-trigger cubic

@felipefreitag
felipefreitag merged commit a9123f3 into canary Nov 13, 2026
17 checks passed
@felipefreitag
felipefreitag deleted the fix/editor-bubble-menu-production-styles branch November 13, 2026 18:18

This branch was successfully deployed

2 active deployments
Preview – react-email-demo — 709944a6 Deployed Nov 13, 2026 by vercel[bot]
Preview – react-email — 709944a6 Deployed Nov 13, 2026 by vercel[bot]
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.

Homepage editor bubble menu loses its layout in production

2 participants