Closed Bug 1913347 Opened 2 years ago Closed 2 years ago

[Wayland] Extension Toolbar in popup cut off

Categories

(WebExtensions :: Untriaged, defect)

Firefox 129
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1620590

People

(Reporter: iodreamify, Unassigned)

Details

Attachments

(5 files)

Attached image screenshot.png —

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

Steps to reproduce:

  1. Install this extension: https://addons.mozilla.org/en-US/firefox/addon/gmail-notifier-restartless
  2. Have an email sent to you and receive the notification from extension
  3. Click on the extension button
  4. Expand popup by pressing arrow down icon

Actual results:

Popup expands but toolbar buttons at the bottom are missing

Expected results:

Toolbar buttons work as on XWayland/X11

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions

Hello,

I did not reproduce the issue on the latest Nightly (131.0a1/20240818204048), Beta (130.0b6/20240816112705) or Release (129.0.1/20240812083845) under Windows 10 and Ubuntu 22.04 LTS.

As per the steps to reproduce, I installed the extension and sent an email from another account. As soon as the email arrives in the inbox, I click the extension button. The extension panel opens to the email that just arrived and when I click the arrow down button, the buttons in the bottom toolbar are displayed without issues.

Could you show a video recording of how it is supposed to look like, and how it actually looks like?

Note to Alex: "Wayland" and "X11" refer to a Linux-specific feature. Bugs attributed to Wayland specifically are likely not reproducible on Windows/macOS, unless the reporter was mistaken and the issue turns out to not be Wayland-specific.

Thank you for the clarification, Rob !

I checked my Ubuntu installation, and it does indeed use Wayland.

That being said, I’ve re-tested the STR on Ubuntu only, and as far as I can understand the actual results mentioned in Comment 0, the issue is not reproducible on my end.

Attached video nightly-recording.mp4 —

Small demo testing on FF nightly 131 with a clean profile.

Sorry it took me a while, bugzilla didn't notify me via email for some reason.

As you can see in the video, part of the email text at the very end is cut off too(and the buttons toolbar is just gone). This isn't very critical for me as there is a very similar web extension for gmail which isn't affected which i could use but it still seems to be a bug.

My environment is Arch linux, kde Plasma Wayland. i tried deleting xdg-desktop-portal-gtk hoping to trigger the bug but it didn't work.

Please let me know if i can provide any other info.

Could you provide a somewhat isolated test case? Your test case requires logging in in Gmail and receiving a specific email.

Is it possible to have a self-contained test case that reproduces the same issue? For example, does the issue also happen with a different extension, or if you know how to, can you use about:debugging to extract the rendered HTML (browser.extension.getViews({type:"popup"})[0].document.documentElement.outerHTML) and share the result?

Flags: needinfo?(iodreamify)
Well this is a Gmail-specific extension so im not sure how to test without being logged in into gmail. This does not happen with another extension like https://addons.mozilla.org/en-US/firefox/addon/checker-plus-gmail/ but their button layout is also different(the email text at the bottom is not cut off though like in the original case) I've tried dumping the extension html in about:debugging with the command you provided, hope i've done this right:
Attached file extension-popup-html —
Well this is a Gmail-specific extension so im not sure how to test without being logged in into gmail. This does not happen with another extension like https://addons.mozilla.org/en-US/firefox/addon/checker-plus-gmail/ but their button layout is also different(the email text at the bottom is not cut off though like in the original case) I've tried dumping the extension html in about:debugging with the command you provided, hope i've done this right:

Reduced test case (I cannot reproduce).

  1. Install the extension, by loading the attached zip file via about:debugging for example.
  2. Click on the extension button.
  3. Repeatedly click on the triangle button in the bottom-left corner to toggle the dimensions of the popup.

Expected:

  • The buttons on the bottom row should be visible.

Actual:

  • A expected. The bug report states that the buttons on the bottom row are hidden, but I cannot observe that behavior.

Can you reproduce your issue with the reduced test case that I created based on your example and the extension?

I think i've found the culprit: i was using fractional 125% scaling on Wayland. As soon as i set it to 100% issue was gone with both the original extension and the reduced test case.

I also tested it with Gnome. And with 150% scaling in Kde Plasma and Gnome. And in Firefox Nightly with these combinations. In all test cases the bug is present so it seems to be not limited to Plasma.

Flags: needinfo?(iodreamify)

Thanks for the extra info, that makes this a duplicate of bug 1620590, specifically the explanation at https://bugzilla.mozilla.org/show_bug.cgi?id=1620590#c9

In the test case, the specified popup height is 580px. At 125% scaling, aka device pixel ratio 1.25, the height is 580 * 1.25 = 725. That exceeds the maximum height of 600, hence the bottom is clipped.

The add-on author should make sure that the height of the panel is within the maximum height multiplied by devicePixelRatio. And instead of hardcoding individual sizes, they could use CSS flexbox.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1620590
Resolution: --- → DUPLICATE

I see. One question though: on Windows 11 i also have scaling set to 125% but don't experience this bug. Does Firefox not follow dpi rules on Windows as closely as on Wayland?

What is the value of devicePixelRatio?

The same value is also shown at about:support as "device pixel ratio"

about:support says Window Device Pixel Ratios = 1.25

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

Attachment

General

Creator:
Created:
Updated:
Size: