fix(files): make the rich-markdown-field container a positioning context - #6435
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview The field’s outer Reviewed by Cursor Bugbot for commit 5043684. Configure here. |
Greptile SummaryAdds a positioning context to the rich Markdown field container so its absolutely positioned bubble menu tracks selections correctly while scrolling.
Confidence Score: 5/5The 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.
|
| 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
Summary
absolutestrategy and maderich-markdown-editor's container a positioning context (relative) — butrich-markdown-fieldalso mountsEditorBubbleMenuwith its own container ref and was missed.relativethere, 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.relativeto the field container. Safe in both modes: it adds no offset and no clipping, including the uncapped (page-scrolls) box.Type of Change
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