fix: prevent custom-panel iframe from shifting the page off-screen#17361
Open
hristoterezov wants to merge 2 commits intomasterfrom
Open
fix: prevent custom-panel iframe from shifting the page off-screen#17361hristoterezov wants to merge 2 commits intomasterfrom
hristoterezov wants to merge 2 commits intomasterfrom
Conversation
…View Chrome's smooth cross-frame scrollIntoView walks up through frame boundaries and lands on the parent's nearest scroll container. With `overflow: hidden`, body is still treated as a scroll container that can be programmatically scrolled, so when iframe content (e.g. the custom panel chat) auto-scrolls on new content, the engine slides the entire body up by the off-screen toolbar's height. Switching to `overflow: clip` removes body from the scroll container chain entirely so the propagation has nowhere to land. `overflow: hidden` is kept as a fallback for browsers that do not understand `clip` (Chrome <90, Safari <16).
…n/closed Without this subscriber, opening or closing the custom panel does not refresh `videoSpaceWidth` in redux, so tile-view dimensions stay sized for the previous layout until something else (window resize, chat toggle, panel drag) triggers a recalculation. Mirrors the equivalent subscribers for chat and the participants pane in `react/features/filmstrip/subscriber.web.ts`.
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.
Summary
Two independent fixes that came out of debugging an intermittent layout glitch where the videoconference would shift up by ~96px after sending a message in the custom-panel iframe (and oscillate with toolbar visibility from then on).
fix(base): prevent body from being scrolled by cross-frame scrollIntoViewRoot cause: the custom-panel iframe's chat auto-scrolls on new content via
scrollIntoView({ behavior: 'smooth' }). Per the CSSOM View spec, the algorithm walks up the frame tree and re-runs against the iframe element in the parent document. Withbody { overflow: hidden }, body is still a scroll container and the engine slides it up by exactlybody.scrollHeight - clientHeight, which equals the off-screen toolbar's height (~96px because the hidden toolbar is parked atbottom: -2 * toolbarSize).overflow: clip(CSS3) makes the element not a scroll container at all, so cross-framescrollIntoViewpropagation has nowhere to land in the parent.overflow: hiddenis kept as a fallback declaration for Chrome <90 and Safari <16.fix(custom-panel): refresh videoSpaceWidth when the panel toggles open/closedIndependent issue spotted in the same area: the custom-panel feature was missing the
isOpensubscriber that chat and the participants pane have (react/features/filmstrip/subscriber.web.ts:103-121). Toggling the panel did not refreshvideoSpaceWidth, so tile-view dimensions stayed sized for the previous layout until something else triggered a recalculation.Test plan
document.body.scrollTopremains 0 throughout.clip) and Safari 15 (falls back tohidden).