Closed Bug 1999123 Opened 7 months ago Closed 7 months ago

Misplaced popups (Hamburger, Download, Tab Thumbnail) sometimes appear at top-left window corner

Categories

(Core :: Widget: Gtk, defect)

Firefox 146
defect

Tracking

()

VERIFIED FIXED
147 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox145 --- unaffected
firefox146 --- verified
firefox147 --- verified

People

(Reporter: erosman, Assigned: stransky)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(7 files)

For the last 3-4 upgrades, occasionally, Hamburger menu, download popup, and tab thumbnails appear misplaced on the far left.
I haven’t found a pattern to reproduce.
It might be Wayland related.

Note: The issue does not appear to affect addons' toolbar popups.

Ubuntu 24.04 Wayland
Maximised Nightly

Attached image bug1999123-a.png
Attached image bug1999123-b.png

Can you please test latest nighly? May be dupe of Bug 1990483.
Thanks.

Flags: needinfo?(eros_uk)

Bug is present in Nightly Build ID 20251109095540

Flags: needinfo?(eros_uk)

Okay please run on terminal with MOZ_LOG="Widget:5 WidgetPopup:5" env variable and attach the log here. for instance as:
MOZ_LOG="Widget:5 WidgetPopup:5" firefox > log.txt 2>&1
Thanks.

Flags: needinfo?(eros_uk)

Bug is present in Nightly Build ID 20251110094323

I am not familiar with it.

  • MOZ_LOG="Widget:5 WidgetPopup:5" firefox > log.txt 2>&1 launched standard Firefox, not Nightly
  • Where would the log be?
Flags: needinfo?(eros_uk)

Ahh sorry, for nightly you need to use:

MOZ_LOG="Widget:5 WidgetPopup:5" ./firefox > log.txt 2>&1

run ./firefox from directory where nightly is located. There will be the log.txt file after that and this needs to be attached here.
Thanks.

Flags: needinfo?(eros_uk)

I tried multiple times but that is all I get in log.txt.

[29039] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM
Flags: needinfo?(eros_uk)

Seeing misplaced popups sometimes too (no clear STR, currently at Nightly 2025-11-08). Will try to enable logging as requested above with about:logging and catch the problem.

This log includes a misplaced popup at around 10:46:37. I've filtered out all lines for "nsWindow::FractionalScaleFactor(): fractional scale 1.00" as there were hundreds of these per second.

Noticed this randomly with Nightly 146.0a1 since 2025-11-08 (possibly a few days before, related Bug 1990483 landed in 2025-11-05), Ubuntu 25.10 (Wayland), GNOME 49, single display, 100% scale, maximized and unmaximized windows. In the case of tab previews, the popup keeps reappearing at the top-left window corner as long as the mouse cursor doesn't hover over a different tab.

Keywords: regression
See Also: → 1990483
Summary: Misplaced Hamburger, Download, Tab Thumbnail popups → Misplaced popups (Hamburger, Download, Tab Thumbnail) sometimes appear at top-left window corner
Version: unspecified → Firefox 146

Log of it happening with tab hover preview.

Thanks, there's the related part here:

2025-11-11 10:46:35.397100 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupHierarchyCalculatePositions()
2025-11-11 10:46:35.397101 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] set parent window [7f0214defc00]
2025-11-11 10:46:35.397103 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] bounds [699, 31] -> [288 x 97]
2025-11-11 10:46:35.397104 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] layout [699, 31] -> [288 x 96]
2025-11-11 10:46:35.397106 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] has toplevel as parent
2025-11-11 10:46:35.397107 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] transformed popup coordinates from [0, 0] to [0, 0]
2025-11-11 10:46:35.397109 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupFitsToplevelWindow()
2025-11-11 10:46:35.397110 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   parent size 1920 x 1026
2025-11-11 10:46:35.397111 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup topleft 699, 31 size 288 x 97
2025-11-11 10:46:35.397112 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   fits 1
2025-11-11 10:46:35.397114 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup [7f01c5b11b00] matches layout [1] anchored [1] first popup [1] use move-to-rect 0
2025-11-11 10:46:35.397115 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupMove
2025-11-11 10:46:35.397116 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   original widget popup position [0, 0]
2025-11-11 10:46:35.397118 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   relative widget popup position [0, 0]
2025-11-11 10:46:35.397119 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   popup use move to rect 0
2025-11-11 10:46:35.397120 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupPrepareForMove()
2025-11-11 10:46:35.397121 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:   type matches and we're not forced to hide it, quit.
2025-11-11 10:46:35.397123 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupMovePlain(0, 0)
2025-11-11 10:46:35.397127 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupHierarchyShowTemporaryHidden()
2025-11-11 10:46:35.397128 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: Widget Popup Hierarchy:
2025-11-11 10:46:35.397131 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:      Frame(7f0215975650) panel Panel/Utility nsWindow [7f01c5b11b00] Permanent 0 ContextMenu 0 Anchored 1 Visible 0 MovedByRect 0
2025-11-11 10:46:35.397137 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: Layout Popup Hierarchy:
2025-11-11 10:46:35.397139 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]:      Frame(7f0215975650) panel Panel/Utility nsWindow [7f01c5b11b00] Permanent 0 ContextMenu 0 Anchored 1 Visible 0 MovedByRect 0
2025-11-11 10:46:35.397141 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::ShowWaylandPopupWindow. Expected to see visible.
2025-11-11 10:46:35.397143 UTC - [Parent 1577257: Main Thread]: D/WidgetPopup [7f01c5b11b00]: nsWindow::WaylandPopupRemoveNegativePosition()
2025-11-11 10:46:35.397231 UTC - [Parent 1577257: Main Thread]: D/Widget moz_container_wayland_size_allocate [7f01c5b11b00] 0,0 -> 288 x 97

I wonder how we ended up with 0,0 position if layout/bounds positions are correct.

Assignee: nobody → stransky
Status: NEW → ASSIGNED

We should uplift it to 146.0.

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch

The patch landed in nightly and beta is affected.
:stransky, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)

Comment on attachment 9526117 [details]
Bug 1999123 [Wayland] Don't consider popup explicitly moved if it's resized only r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Misplaced popups if popup was resized only and not placed explicitly.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • 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): We add another check for resize only to fix for Bug 1990483.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(stransky)
Attachment #9526117 - Flags: approval-mozilla-beta?

Comment on attachment 9526117 [details]
Bug 1999123 [Wayland] Don't consider popup explicitly moved if it's resized only r?emilio

Approved for 146.0b3

Attachment #9526117 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift][qa-ver-needed-c147/b146]
Flags: qe-verify+
QA Contact: mchiorean

I was able only to reproduce Bug 1990483 on an older build (Firefox Nightly 146.0a1 since 2025-11-04), but could not reproduce the issue described here, using Nightly from 2025-11-09.
Erosman, can you please confirm issue is fixed on latest Beta, and latest Nightly. Thank you.

Flags: needinfo?(eros_uk)

I have not experienced on Nightly it since the fix.

Flags: needinfo?(eros_uk)

Marked as verified based on reporter's comment#23 and based on the fact that I could not reproduce it on latest beta builds.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c147/b146] → [uplift][qa-ver-done-c147/b146]
Flags: qe-verify+

There are other instances of misplaced popups. I left a note on #nightly:mozilla.org on Nov 21, but there has been no response.
The screenshots will follow, in case they are related to this bug.
One is for the Dev Tools Console Settings popup and the other for the context-menu popup.

Attached image bug1999123-c.png
Attached image bug1999123-d.png

(In reply to erosman [:erosman] from comment #25)

There are other instances of misplaced popups. I left a note on #nightly:mozilla.org on Nov 21, but there has been no response.
The screenshots will follow, in case they are related to this bug.
One is for the Dev Tools Console Settings popup and the other for the context-menu popup.

Please file a new bug for it and needinfo me there.
Thanks!

Flags: needinfo?(eros_uk)
See Also: → 2003045
Flags: needinfo?(eros_uk)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: