Closed Bug 1823336 Opened 1 year ago Closed 1 year ago

[Wayland] Bookmarks Menu popup is not aligned with the toolbar button

Categories

(Core :: Widget: Gtk, defect)

Firefox 113
defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- unaffected
firefox112 --- unaffected
firefox113 --- fixed

People

(Reporter: ke5trel, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

STR:

  1. Open Customize mode and add the "Bookmarks Menu" button to the toolbar.
  2. Click the "Bookmarks Menu" button.

The popup appears horizontally displaced rather than being anchored to the button.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=526b311af03354ed0f06ec7572b486a51bc884f6&tochange=c15f0fb1c92375ea751b3916a4c25a34403f21b2

Regressed by Bug 1809084.

:emilio, since you are the author of the regressor, bug 1809084, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

This only happens on the right of the toolbar, and only on Wayland afaict.

Assignee: nobody → emilio
Summary: Bookmarks Menu popup is not aligned with the toolbar button → [Wayland] Bookmarks Menu popup is not aligned with the toolbar button

Yes, this only happens with MOZ_ENABLE_WAYLAND=1 on Ubuntu 22.10.

Component: XUL → Widget: Gtk

This matches the nsMenuPopupFrame code.

There are a few places where we want to fix our position, and I unified
how we do this in the regressing bug.

ShouldFollowAnchor() = false popups like this used to just not be repositioned directly:

https://hg.mozilla.org/mozilla-central/rev/c15f0fb1c92375ea751b3916a4c25a34403f21b2#l9.274

IsNoAutoHide() popups fixed their position once:

https://hg.mozilla.org/mozilla-central/rev/c15f0fb1c92375ea751b3916a4c25a34403f21b2#l9.867

I unified in the noautohide behavior but in a better place here:

https://hg.mozilla.org/mozilla-central/rev/c15f0fb1c92375ea751b3916a4c25a34403f21b2#l9.1182

But this trips this Wayland code which wasn't treating AnchorType_Point
popups properly.

The fact that this popup doesn't follow the anchor feels wrong, but is
pre-existing.

Flags: needinfo?(emilio)

The fact that the bookmarks popup doesn't follow its anchor feels like
an oversight that stems from the fact that only <panel type=arrow>
panels do that by default.

Follow anchors by default, while keeping the opt-out possible instead.

Duplicate of this bug: 1823249

I can also confirm that with regards to the "Bookmarks Menu" button on Ubuntu 22.10 Wayland
AFA this bug, please note that Unlike bug 1823249, maximisation of browser window is not a factor.

What/where is MOZ_ENABLE_WAYLAND=1?
I don't have it in about:config?

about:support

Window Protocol	        wayland
Desktop Environment	ubuntu:gnome

Subsequent to further testing, please note the following:
My set up is a laptop plus extra monitor (set to join). Their resolutions are not set the same i.e.laptop 1368x768, monitor 1920x1080.

Extension Developer Tools bug 1823249

  • Developer Tools in above refers to Extension Developer Tools, not Web Developer Tools (Ctrl+Shift+i)
    about:debugging#/runtime/this-firefox -> (any extension) Inspect
  • Issue is observed with maximised window on both the laptop & external monitor
  • No issue with NOT maximised window on both the laptop & external monitor

Web Developer Tools

I get an interesting result when testing with Web Developer Tools in a Separate Window.

3-dot Popup location in Web Developer Tools

  • No issue on the external monitor, maximised or not
  • No issue on laptop monitor when NOT maximised
  • Same issue as bug 1823249 on laptop monitor when maximised

If the monitor resolution is a factor, then the Developer Tools might be calculating the location of the popup based on incorrect resolution. Firefox might be recalculating the location when not-maximised.

screenshot to follow

Attached image bug1823336.png

Web Developer Tools maximised

Tested with Firefox 111.0 (64-bit), Ubuntu 22.10

  • No issue with Web Developer Tools
  • Extension Developer Tools doesn't have maximise option so it cant be tested when maximised (no issue when not- maximised)
No longer duplicate of this bug: 1823249

Bug 1823552 also fixes this by preserving the anchor rect, but the fix here should probably still apply.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65dc634125a8
[wayland] For unanchored popups don't read anchor / popup gravity. r=stransky
Attachment #9323913 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Flags: qe-verify+

Reproduced the issue with Firefox 113.0a1 (2023-03-20) on Ubuntu 22.
The issue is verified fixed with Firefox 114.0a1 (20230427095144) and Firefox 113.0b8 (20230425192707) on Ubuntu 22.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

I can also verify it is fixed with Nightly 114.0a1 (2023-04-27) on Ubuntu 23.04 Wayland. Bug 1823249 is a similar but separate issue.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: