fix: extension popup panel height on fractional scaling#13607
Open
shelldandy wants to merge 2 commits into
Open
fix: extension popup panel height on fractional scaling#13607shelldandy wants to merge 2 commits into
shelldandy wants to merge 2 commits into
Conversation
Browser-action extension popups (which use `ViewPopup` with
`fixedWidth=false`) rely on `viewNode.customRectGetter` to tell
panelmultiview how tall the subview should be:
this.viewNode.customRectGetter = () => {
return { height: this.lastCalculatedInViewHeight || this.viewHeight };
};
`resizeBrowser` already updates `lastCalculatedInViewHeight` in the
`fixedWidth=true` branch but forgets to do it in the `fixedWidth=false`
branch (which is what `browser_action` popups always use). As a result
`customRectGetter` keeps returning the stale `viewHeight` that was
captured once during `attach()` from
`viewNode.getBoundingClientRect().height`.
On Wayland compositors with fractional scaling (e.g. Hyprland), and
especially in single-toolbar layouts where the panelview is reparented
into a freshly created `customizationui-widget-panel`, that one-shot
measurement can land on an inflated value before the popup HTML reports
its real intrinsic size. The inner `<browser>` ends up sized correctly,
but the surrounding panel stays locked to the inflated height — which
shows up to the user as a small popup floating in a tall, mostly-empty
panel, with the bottom of the popup unclickable.
Mirror the existing `fixedWidth=true` update in the `else` branch so
`customRectGetter` always reports the up-to-date popup height and
panelmultiview lets the panel shrink to fit.
Ships as a temporary external Firefox patch under
`src/external-patches/firefox/` until it lands upstream in Mozilla.
Member
|
please use |
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.
Closes #13518
After:

Before:
