Skip to content

fix(files): make the rich-markdown-field container a positioning context - #6435

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/bubble-menu-field-positioning-context
Aug 8, 2026
Merged

fix(files): make the rich-markdown-field container a positioning context#6435
waleedlatif1 merged 1 commit into
stagingfrom
fix/bubble-menu-field-positioning-context

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Follow-up to fix(files): pin editor bubble menus to the cursor during scroll #6434 (native-pin bubble menus). That PR appended the menus into their scroll container using TipTap's default absolute strategy and made rich-markdown-editor's container a positioning context (relative) — but rich-markdown-field also mounts EditorBubbleMenu with its own container ref and was missed.
  • Without relative there, the absolutely-positioned toolbar resolves against the wrong offset parent, so scroll tracking breaks in the field. Caught by Cursor Bugbot on fix(files): pin editor bubble menus to the cursor during scroll #6434 after it merged.
  • Adds relative to the field container. Safe in both modes: it adds no offset and no clipping, including the uncapped (page-scrolls) box.

Type of Change

  • Bug fix

Testing

Empirically verified in a harness against the real menu component: in the field's uncapped/page-scroll mode the toolbar pins to the cursor with 0 px drift on window scroll (the previously untested path). Capped mode uses the same mechanism already verified on #6434. 521 editor tests pass; type-check + biome clean.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

rich-markdown-field also mounts EditorBubbleMenu with its own container ref, so
the same 'relative' the editor container needs applies here — otherwise the
absolutely-positioned toolbar resolves against the wrong offset parent and scroll
tracking breaks in the field. Safe in both modes: 'relative' adds no offset and no
clipping to the uncapped (page-scrolls) box.
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 8, 2026 8:25pm

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Single CSS class on the field wrapper; mirrors an already-merged fix on the file editor with no auth, data, or behavioral logic changes.

Overview
Follow-up to the #6434 bubble-menu scroll fix: RichMarkdownEditor already had relative on its scroll container, but RichMarkdownField still mounted EditorBubbleMenu with scrollContainerRef on a non-positioned wrapper.

The field’s outer div now includes relative so the menu appended there uses the correct offset parent and tracks the selection while scrolling (capped internal scroll and uncapped page scroll). No layout offset or extra clipping—only establishes positioning context for TipTap’s default absolute toolbar strategy.

Reviewed by Cursor Bugbot for commit 5043684. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a positioning context to the rich Markdown field container so its absolutely positioned bubble menu tracks selections correctly while scrolling.

  • Adds Tailwind’s relative class to the existing field container.
  • Documents why the container must serve as the bubble menu’s containing block.

Confidence Score: 5/5

The PR appears safe to merge, with no blocking or non-blocking issues identified.

The narrowly scoped class change establishes the intended containing block without adding offsets or clipping, and the accompanying comment accurately explains the behavior.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx The field container now establishes the intended positioning context for its bubble menu; no actionable regressions were identified.

Reviews (1): Last reviewed commit: "fix(files): make the rich-markdown-field..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit a7b016b into staging Aug 8, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/bubble-menu-field-positioning-context branch August 8, 2026 20:29
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