Closed Bug 1741830 Opened 3 years ago Closed 3 years ago

Menu is too short when opened from the top of a screen located under a bigger screen

Categories

(Firefox :: Menus, defect, P3)

Firefox 95
Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox95 --- wontfix
firefox98 --- fixed

People

(Reporter: ariedewild, Assigned: emilio)

References

Details

Attachments

(3 files)

Attached video Repro.mp4 (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

See my desktop configuration in the repro video. The issue occurs in the desktop that is placed beneath the other desktops.

Actual results:

Menu item in toolbar are not expanded correctly when Firefox window is in the top of the display. See attached video.

Expected results:

Correctly expanding menus.

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

Component: Untriaged → Menus

Jan Erik or Arie, do you happen to know if this used to work properly before it broke?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(janerikkeller)
Flags: needinfo?(ariedewild)
Summary: Menu expands to small with specific monitor configuration → Menu is too short when opened from the top of a screen located under a bigger screen

I noticed this yesterday for the first time. The update history shows that I installed Firefox 95 Beta 8 the day before that, so I suspect the bug is introduced with that version.

Flags: needinfo?(ariedewild)

(In reply to ariedewild from comment #4)

I noticed this yesterday for the first time. The update history shows that I installed Firefox 95 Beta 8 the day before that, so I suspect the bug is introduced with that version.

Ah, that's good to know - can you check in the update history what version you were running before that?

It's a bit interesting because in bug 1742058, it looks like Jan Erik reported this with version 94...

Flags: needinfo?(ariedewild)
OS: Unspecified → Windows
Hardware: Unspecified → Desktop

Yes I have this issue for month now. Definitely before 94.

Flags: needinfo?(janerikkeller)

Forgot to mention. My lower screen is high resulution and scaled to 150% the external screen is at 100% scale.
But I have the same issue with another laptop where both screens run at 100% scale.

OK, thanks both.

Unfortunately although I have a Windows desktop, it only has 1 screen so I can't easily try to reproduce this myself.

If either of you would be willing to use mozregression to find out exactly when this broke, that would be very useful in determining what the source of the problem is (or, indeed, that it's been broken for years if so).

Flags: needinfo?(janerikkeller)

Ok I testet it back to the previous UI in 2017. It failed everytime on my system.

Flags: needinfo?(janerikkeller)

Emilio, do you have any idea what's happening here? Feels like a layout issue in terms of the popup positioning.

Flags: needinfo?(ariedewild) → needinfo?(emilio)

Hi,

I've a new observation to share. The problem does not occure if the screens have the same scaling (eg 100% or 125%) in the windows settings.

It occures only on the lower screen and only if the scaling setting is higher as the upper screen. If it's scalling is equal or lower to the upper screen everything works as intended.

This is still on my list to look at, but the most useful thing to get here would be to get a regression window. From the people that can repro, can you use mozregression to try to see what broke this?

I tried to repro the screen setup in comment 0 but couldn't repro the bug (in Win11, though, and one of the top monitors had an smaller resolution than the others). Reporter, is there anything else interesting about your display configuration (scaling, etc) that could help me reproduce this? Thanks.

Flags: needinfo?(emilio) → needinfo?(ariedewild)

You need to set the scaling of the screen at the bottom to 125%. In the configuration with 3 monitors I described in comment 0, it only occurs if the scaling of monitor 2 (top-right) is 100% and monitor 1 (bottom) is 125%. The scaling setting of monitor 3 (top-left) seems to not effect this issue.

After playing with the scaling settings I found out the issue also occurs when monitors 1 and 2 are both set to 150%. It does not occur when monitor 2 is at 150% and monitor 1 at 125%. In all test cases Firefox is on monitor 1 (bottom).

Flags: needinfo?(ariedewild)

Ok, will try that, thanks!

Flags: needinfo?(emilio)
Severity: -- → S3
Priority: -- → P3

Ok, I finally got to reproduce this with two monitors. It's enough to have the one at the bottom with a larger scale than the one at the top but, for some reason, not every scaling works.

I got it to work with the top monitor at 150% scaling and bottom monitor at 200% scaling. If I make that 100% and 200% then it doesn't break...

It seems either some of the anchor coordinates there are off, because we seem to end up with the wrong screen in that code.

Assignee: nobody → emilio
Flags: needinfo?(emilio)

screenForRect takes screen coordinates (device pixels, for our purpose here).

However screenX / screenY are in CSS pixels, so we need to convert them to the
right coordinate space before looking up the screen.

Blocks: 1753836
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch

Can you confirm this is fixed on the next Nightly build? Sorry it took so long to fix btw, it was quite tricky to reproduce :/

Flags: needinfo?(ariedewild)

Does it work with macOS and Windows 7?
screenForRect takes coordinates in desktop pixels. While desktop pixels are equivalent to device pixels on Windows 8.1+ (where per-monitor dpi is available) and Linux, they are equivalent to CSS pixels on macOS and Windows 7.

Flags: needinfo?(emilio)

I don't have a win7 or macOS multi-monitor setup. Let me try to get one this week, and sort some of this out in bug 1753836.

Flags: needinfo?(emilio)
QA Whiteboard: [qa-98b-p2]

I can confirm that this bug is fixed on the current nightly. Tested on Windows 11.
Thanks!

Flags: needinfo?(ariedewild)
Regressions: 1757169
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: