Repository navigation
Conversation
…eline sits low EditPopover positions itself with position: fixed and viewport coordinates, but rendered inline inside the timeline's dockview panel, whose transformed overlay becomes the containing block. The popover landed relative to the panel and was clipped below the window. Portal it to document.body like the other timeline menus. Fixes heygen-com#5376
MannXo
marked this pull request as ready for review
October 11, 2026 08:28
jrusso1020
approved these changes
Oct 13, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
What I checked:
- Outside-click and Escape still work after the move: they go through
popoverRef.containsandwindowlisteners. React synthetic events still reach the timeline container's handlers through the portal, as before. - Studio
src/player/components/tests: 142 files / 1816 passed at this head, and 142 / 1818 on a local merge with current main (merges cleanly; main's dash-free copy in this file is kept). - Mutation: with the portal reverted, the new
EditModal.test.tsxfails (expected true to be false), so it guards the fix. - Agreed on leaving out the clamp. With viewport coordinates,
top = max(8, anchorY - 280)can't start below the window.
Unrelated, pre-existing note for a possible follow-up: the outside-click listener is added in a 100ms setTimeout (EditModal.tsx:80), so an unmount inside that window leaks the listener.
— Rames
jrusso1020
enabled auto-merge
October 13, 2026 01:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Shift+drag range edit popover (
EditPopover) now renders throughcreatePortal(..., document.body), so it shows up wherever the timeline panel sits.Why
EditPopoverpositions itself withposition: fixedand viewport coordinates (anchorYis the pointer'sclientY), but it rendered inline inside the timeline panel. Dockview's.dv-render-overlayaround that panel is transformed, which makes it the containing block for fixed descendants, so the popover was placed relative to the panel instead of the window. With the default layout at 1080p it landed below the window and could not be seen.Related work
Fixes #5376
How
Wrap the popover in
createPortal(..., document.body), which is what the other timeline overlays already do (ClipContextMenu,KeyframeDiamondContextMenu,TrackGapContextMenu,AudioGainDialog,AutomationSelectionMenu,TimelineFxButton). The outside-click and Escape handlers keep working because they go through the popover's ref andwindow.The issue also suggests clamping
toptoinnerHeight. Once the coordinates resolve against the viewport,topisanchorY - 280withanchorYinside the window, so the popover cannot start below the bottom edge and the clamp would never apply. I left it out.The shared
ui/Popoveris anchored to a trigger element, and this popover opens at the end of a drag with no trigger, so it stays a plain portal like its siblings.Test plan
Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)
Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug
New
EditModal.test.tsxrendersEditPopoverinside a transformed container and asserts the popover is not inside it. It fails without the change. happy-dom does no layout, so the clipping itself is checked in a browser below.bun run --cwd packages/studio test(695 files, 7866 tests),bun run --cwd packages/studio typecheck,bun run lint,oxfmt --check,node scripts/check-comment-citations.mjsandnode scripts/comment-ratchet.mjsall pass.In a browser, with Studio dev on the
fade-handlesfixture at 1920x1080, I Shift+dragged on the timeline lane (pointer at y=850). Before the change the popover'sstyle.topwas 570px, but it rendered at 1330px, entirely below the 1080px window. After it, the popover renders at 570px above the timeline and its textarea takes clicks.Before:
After: