[Ubuntu 24.04LTS GNOME 46] Misplaced popups (Dev Tools Console Settings, context-menu) sometimes appear at top-left window corner
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox145 | --- | unaffected |
| firefox146 | --- | unaffected |
| firefox147 | --- | fixed |
| firefox148 | --- | fixed |
| firefox149 | --- | fixed |
People
(Reporter: erosman, Assigned: stransky)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(12 files)
|
32.57 KB,
image/png
|
Details | |
|
60.56 KB,
image/png
|
Details | |
|
28.01 KB,
image/png
|
Details | |
|
23.03 KB,
image/png
|
Details | |
|
26.04 KB,
image/png
|
Details | |
|
17.87 KB,
image/png
|
Details | |
|
44.98 KB,
text/plain
|
Details | |
|
71.11 KB,
text/plain
|
Details | |
|
707.33 KB,
video/webm
|
Details | |
|
114.75 KB,
image/png
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release+
|
Details | Review |
|
622.31 KB,
video/mp4
|
Details |
Subsequent to bug 1999123, there are other instances of misplaced popups. e.g. the Dev Tools Console Settings popup and the context-menu popup.
STR
- Open the Dev Tools (F12)
- Go to the Console Tab
- Click on the cogwheel icon (top right)
AFA the context-menu, it is sporadic. I noticed it when right-clicking links, images but there is no definite pattern for STR.
Note: the Dev Tools Settings popup misplacement only happens when Firefox is maximised.
Ubuntu 24.04 Wayland
Nightly
| Reporter | ||
Comment 1•7 months ago
|
||
| Reporter | ||
Comment 2•7 months ago
|
||
| Reporter | ||
Updated•7 months ago
|
| Reporter | ||
Comment 3•7 months ago
|
||
Dev Tools -> Inspector -> mouse-over item with a popup (e.g. var(--step-3))
| Assignee | ||
Comment 4•7 months ago
|
||
Not sure I can reproduce on Gnome 49. The cogwheel icon popup uses negative margin so we position it wrongly with move-to-rect but I don't see the 0,0 position but rather x-200 one.
Can you try to get MOZ_LOG="Widget:5 WidgetPopup:5" ./firefox > log.txt 2>&1 log for any of the misplaced popups?
Thanks.
| Assignee | ||
Updated•7 months ago
|
| Reporter | ||
Comment 5•7 months ago
|
||
Can you try to get MOZ_LOG="Widget:5 WidgetPopup:5" ./firefox > log.txt 2>&1 log for any of the misplaced popups?
I have done this before and I did it again, but all I get in the log is:
[18579] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM
Note: the Dev Tools Settings popup misplacement only happens when Firefox is maximised.
| Reporter | ||
Comment 6•7 months ago
•
|
||
Also in: Firefox 145.0.2 build ID 20251125000153, maximised
| Reporter | ||
Comment 7•7 months ago
|
||
Firefox 145.0.2 build ID 20251125000153, not-maximised
| Assignee | ||
Comment 8•7 months ago
|
||
I suspect it's due to negative margin - will check it.
| Assignee | ||
Comment 9•7 months ago
|
||
I see the same bug on 145.0.2.
| Assignee | ||
Comment 10•7 months ago
|
||
Looks like it's due to flip_x used there:
[Parent 86908: Main Thread]: D/WidgetPopup [7f0385d0ad00]: Anchor rect [1712, 655] -> [1 x 1]
...
[Parent 86908: Main Thread]: D/WidgetPopup [7f0385d0ad00] NativeMoveResizeCallback flipped_x 1 flipped_y 0
[Parent 86908: Main Thread]: D/WidgetPopup [7f0385d0ad00] new position [1474, 646] -> [228 x 176]
| Assignee | ||
Comment 11•7 months ago
|
||
I wonder if we can check the popup type and disable flip if popup has the visible anchor. Emilio, do you know if we can check that?
Thanks.
Comment 12•7 months ago
|
||
Well, yes, and no. Doing that would be counter-productive for most other popups, right? Even if the anchor is visible the popup might not (think putting an extension window at the left of the toolbar).
The main issue is that these DevTools popups don't use the usual <menupopup> styling so we believe the shadow is part of the popup's content that may be visible...
But also the position shouldn't end up at 0,0? I can't reproduce this on KDE...
Updated•7 months ago
|
Comment 13•7 months ago
|
||
The displaced devtools popups when overflowing is already covered by Bug 1823249.
The (0,0) popup placement is a new regression that affects Ubuntu 24.04LTS (GNOME 46) but not Ubuntu 25.10 (GNOME 49) (single display).
At 100%, 175% and 200% scale, overflowing devtool popups consistently appear at (0,0).
At 125% and 150% scale, popups only flash briefly at (0,0) before correcting.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f84254926bdf6d2506f6577156f9e7804fc9de38&tochange=cd20a71d574690e3162d9368225defce3ff06969
Regressed by Bug 1998382.
Comment 14•7 months ago
|
||
Comment 15•7 months ago
|
||
| Assignee | ||
Comment 16•7 months ago
|
||
Kestrel, can you please run the case when popup is placed at 0,0 persistently with MOZ_LOG="Widget:5,WidgetPopup:5" WAYLAND_DEBUG=1 variables and attach the log here?
From the widget log only it looks like we place the popup correctly (somehow) according to what compositor gives us.
| Assignee | ||
Updated•7 months ago
|
Comment 17•6 months ago
|
||
Comment 18•6 months ago
|
||
Set release status flags based on info from the regressing bug 1998382
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 19•6 months ago
|
||
If that's Gnome 46 compositor bug (perhaps wrong interaction between xdg-popup and persistent wl_surface) which leads to persistent 0,0 popup placement we can detect such case and use plain move to original coordinates (direct placement) or place the popup inside of toplevel window.
| Assignee | ||
Comment 20•6 months ago
|
||
Hm, is the log really for the popup shown at 0,0? Because the says it's shown at 1408, 706:
[2041279.057] xdg_popup@92.configure(1408, 706, 233, 173)
[Parent 208245: Main Thread]: D/WidgetPopup [7c6f3a019600] NativeMoveResizeCallback flipped_x 1 flipped_y 1
[Parent 208245: Main Thread]: D/WidgetPopup [7c6f3a019600] new position [1408, 706] -> [233 x 173]
[2041279.119] xdg_surface@91.configure(6751)
so compositor says it's displayed at [1408, 706] but actually rendered at 0,0. If that's already fixed in Gnome 49 we shall ask Ubuntu to backport the compositor fix to Mutter 46 then.
| Assignee | ||
Updated•6 months ago
|
Comment 21•6 months ago
|
||
Easily encountered by right-clicking near bottom screen edge where the context menu flips above the cursor. Despite the menu appearing at (0,0), it is still interactive in its original expected location. Submenus appear in their correct location.
The black box in the recording is transparent and has a hall of mirrors effect when the cursor passes over it.
| Assignee | ||
Comment 22•5 months ago
|
||
I think widget.wayland.use-move-to-rect set to false fixes it, right?
Thanks.
Comment 23•5 months ago
|
||
It does not happen with widget.wayland.use-move-to-rect = false.
Comment 24•5 months ago
|
||
Reproduced when hovering the bottom tabs when they are vertical and overflow. Mozregression pointed out to bug 1998382.
Comment 25•5 months ago
|
||
Hi Martin, what's our path forward on this bug?
| Assignee | ||
Comment 26•5 months ago
|
||
Will check that on actual Ubuntu 24.04LTS. We have only this report so doesn't look much wide-spread? Or may be affect only specific line?
Anyway, the best solution is to persuade ubuntu folks to update mutter to fixed/working version. Or we can use widget.wayland.use-move-to-rect=false there (with some plumbing & boundaries updates) but there's a problem to detect the environment correctly - can we check we're running Ubuntu 24.04LTS?
| Assignee | ||
Comment 27•5 months ago
|
||
Okay, testes on Ubuntu 24.04LTS. From the testing it looks like when wl_surface is created & used with xdg_popup and then the save surface is used with wl_subsurface we see the misplacement here.
So if we use xdg_popup with popup we need to keep that method and don't switch to subsurfaces for it.
So this is a generally a regression from Bug 1975969 revealed by Bug 1998382 (but still Mutter 46 only bug).
| Assignee | ||
Comment 28•5 months ago
|
||
I think we just need to keep mPopupUseMoveToRect true if that's set once.
| Assignee | ||
Comment 29•5 months ago
|
||
We may also add alway-use-move-to-rect option for testing such cases.
| Assignee | ||
Comment 30•5 months ago
|
||
Updated•5 months ago
|
| Assignee | ||
Comment 31•5 months ago
|
||
We should backport it to beta.
Comment 32•5 months ago
|
||
Comment 33•5 months ago
|
||
| bugherder | ||
Comment 34•5 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #31)
We should backport it to beta.
Please add a beta uplift request when ready.
It might be too late for release, but please consider adding a request just in case.
| Assignee | ||
Comment 36•5 months ago
|
||
Comment on attachment 9539731 [details]
Bug 2003045 [Wayland] Don't switch between xdg_popup and wl_subsurface popups r?emilio
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: popup windows may be misplaced on Wayland
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Disable popup placement optimization we introduced in Bug 1975969.
- String changes made/needed:
- Is Android affected?: No
Comment 38•5 months ago
|
||
Comment on attachment 9539731 [details]
Bug 2003045 [Wayland] Don't switch between xdg_popup and wl_subsurface popups r?emilio
Approved for 148.0b8
Updated•5 months ago
|
Comment 39•5 months ago
|
||
| uplift | ||
Comment 41•5 months ago
|
||
Comment on attachment 9539731 [details]
Bug 2003045 [Wayland] Don't switch between xdg_popup and wl_subsurface popups r?emilio
Approved for 147.0.3
Updated•5 months ago
|
Comment 42•5 months ago
|
||
| uplift | ||
Updated•4 months ago
|
Updated•4 months ago
|
Comment 43•4 months ago
|
||
I could still reproduce the issue with Firefox 147.0.3, 148 beta 10 and latest Nightly 149.0a1 2026-02-02 under Ubuntu 24 Wayland.
All the issues mentioned in this bug and in the duplicates (context menu position, tab hover preview, developer tools, console settings) are still reproducible.
It might not occur as often, but once hit, the wrong popup position will persist longer and for several trigger points.
Example: the tab hover preview that I pointed out in comment 24 was only shown for the bottom tabs (2 or 3). Now, once hit, the preview will be shown in top left corner for all the tabs (please see the attached video).
| Assignee | ||
Comment 44•4 months ago
|
||
(In reply to Petruta Horea [:phorea] from comment #43)
Created attachment 9542300 [details]
147.0.3 wayland popups.mp4I could still reproduce the issue with Firefox 147.0.3, 148 beta 10 and latest Nightly 149.0a1 2026-02-02 under Ubuntu 24 Wayland.
All the issues mentioned in this bug and in the duplicates (context menu position, tab hover preview, developer tools, console settings) are still reproducible.
It might not occur as often, but once hit, the wrong popup position will persist longer and for several trigger points.Example: the tab hover preview that I pointed out in comment 24 was only shown for the bottom tabs (2 or 3). Now, once hit, the preview will be shown in top left corner for all the tabs (please see the attached video).
Please file a new bug for it. Do you have any exact reproduction steps?
Thanks.
Comment 45•4 months ago
|
||
Thank you! I filled bug 2014419.
There are no exact reproduction steps, I just clicked around to see if the issue was fixed and I encountered it again pretty easily, with both new or used Firefox profiles.
Updated•4 months ago
|
Updated•4 months ago
|
Description
•