Closed Bug 1751882 Opened 4 months ago Closed 3 months ago

context menu submenu highlight misalign


(Core :: Widget: Gtk, defect)

Firefox 98



99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- fixed


(Reporter: lilydjwg, Assigned: emilio)




(Keywords: regression)


(2 files)

Attached image fx-wayland-misalign.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

  • switch to wayland and enable that for firefox
  • get a context menu and move to a submenu

Actual results:

See attached screenshot. The top of submenu including margin or border or whatever is aligned with supermenu (or parent menu?)'s item. The items themselves are not aligned.

Expected results:

The items themselves should be aligned.

The round corner and top and bottom margins are only seen on Wayland in the default GTK theme, so it happens to firefox only after switching to Wayland.

I managed to get rid of the round corner and margins with the following GTK css, but Firefox's submenu is still off by one pixel (the gray border).

.csd menu {
  border-radius: 0px;
  padding: 0px;

.csd.popup decoration {
  border-radius: 0px;

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Blocks: wayland
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Seems to also happen in XWayland / X11, what am I missing?

Your GTK theme is different than default? This should be caused by the difference of the GTK theme on different platforms.

Gnome Wayland + Xwayland, Adwaita-dark, Debian Testing
Also reproducible with Xwayland.
The second popup needs to be a few more pixels to the top, so that both blue bars are in one line.

No longer blocks: wayland
Ever confirmed: true
Keywords: regression
Summary: context menu submenu misalign on Wayland → context menu submenu misalign

I just checked that the one-pixel difference also happens on xwayland. It was just not that obvious to notice.

That's much more than 1 pixel. It's more like the padding-top from the submenu needs to be subtracted from its "top", so that both blue bars are in one line (flushness).

bad is when both blue bars are not in one line.
mozregression --good 90 --bad 2022-01-24

9:14.64 INFO: Last good revision: 184d074f07d7d64f5aad4ccb7b683b2e937d3548
9:14.64 INFO: First bad revision: 8af885e0f3dd5b4dadc42d270f13f009092873c4
9:14.64 INFO: Pushlog:

8af885e0f3dd5b4dadc42d270f13f009092873c4 Emilio Cobos Álvarez — Bug 1738084 - Make popups on Linux have shadows. r=stransky

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1738084
Summary: context menu submenu misalign → context menu submenu highlight misalign
Assignee: nobody → emilio
Pushed by
Vertically align submenus on Linux. r=stransky,dao
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.