Closed Bug 1993474 Opened 1 year ago Closed 11 months ago

On an external monitor in a maximized Firefox window, can't select a tab with the cursor at the top of the screen

Categories

(Core :: Widget: Win32, defect)

defect

Tracking

()

VERIFIED FIXED
147 Branch
Tracking Status
relnote-firefox --- 147+
firefox-esr140 --- unaffected
firefox143 --- unaffected
firefox144 --- unaffected
firefox145 + wontfix
firefox146 - wontfix
firefox147 + verified

People

(Reporter: gstoll, Assigned: emilio)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files, 2 external files, 3 obsolete files)

I can't click tabs if I have my cursor at the top of the screen. Need to move it down by 3-4 pixels to be able to click the hit area. This happens only on external monitors, not the laptop screen. The caption buttons or new tab button are also not clickable.

mozregression points at bug 1947324.

Set release status flags based on info from the regressing bug 1947324

On my external monitor, there's an extra 5 px of space in the titlebar that seems to be causing this. This seems to be caused by the call to put_ExtendsContentIntoTitleBar(true).

Set release status flags based on info from the regressing bug 1947324

Using the Browser Toolbox Inspector, when the window is maximized and on my external monitor (may be an DPI thing), there is ~5 px at the top of the titlebar that Firefox isn't drawing on. (i.e. mousing over the top <html> tag doesn't highlight)

Calling SetPresenterKind(AppWindowPresenterKind_FullScreen) does not help.

See Also: → 1998848
See Also: → 1996010
Duplicate of this bug: 1999773
See Also: → 1968382

So i originally posted my own bug report but its been merged here.

I decided to try that widget.windows.windowsappsdk.enabled to false, and it also fixes my issue, but the strange thing is when i view photos with windows photo viewer, i have that big white line at the top of my screen on my 2nd monitor still, so its not just a firefox issue

Im thinking this is actually a windows 11 issue?

Removing the WS_BORDER style from our windows seems to fix this. I was going to only do this when our window is maximized, but even with an unmaximized window you can still drag/resize it, and this also seems to fix bug 1994918 so I'm going to try just turning it off everywhere and see what happens.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED
Duplicate of this bug: 1996010
See Also: → 1991403
See Also: → 2000193
Duplicate of this bug: 2000193

[Tracking Requested - why for this release]: Many duplicates and Reddit threads about this problem; I'd like to uplift to beta after the fix is in.

See Also: 1996010, 2000193 →
Duplicate of this bug: 1999857

When a window with WS_BORDER is maximized on a low-ish DPI monitor, an
"extra" border on top shows up. This breaks the workflow of moving your
mouse to the very top of the screen to hover over or select tabs.

(people have reported this with non-Firefox apps so I'm guessing this is
really an OS problem)

But the WS_BORDER style doesn't actually seem necessary for us when tabs
are being shown in the toolbar - removing it still means we can resize
our window, etc.

We do need to handle the case when tabs are not being shown in the toolbar,
so we have to toggle the WS_BORDER style when that changes. I tested on my
system in a number of different configurations and it seems to work fine.

I believe this will fix bug 1994918 and possibly some others.

Duplicate of this bug: 1999579

firefox-beta Uplift Approval Request

  • User impact if declined: Multiple users have reached out via Bugzilla, SUMO, and Reddit, complaining about this issue.
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: medium
  • Explanation of risk level: Changing our window styles is a little risky. I have verified this fix with my dev build locally (on Windows 11) and on a Windows 10 VM.
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9526883 - Flags: approval-mozilla-beta?

When a window with WS_BORDER is maximized on a low-ish DPI monitor, an
"extra" border on top shows up. This breaks the workflow of moving your
mouse to the very top of the screen to hover over or select tabs.

(people have reported this with non-Firefox apps so I'm guessing this is
really an OS problem)

But the WS_BORDER style doesn't actually seem necessary for us when tabs
are being shown in the toolbar - removing it still means we can resize
our window, etc.

We do need to handle the case when tabs are not being shown in the toolbar,
so we have to toggle the WS_BORDER style when that changes. I tested on my
system in a number of different configurations and it seems to work fine.

I believe this will fix bug 1994918 and possibly some others.

Original Revision: https://phabricator.services.mozilla.com/D272653

Attachment #9526883 - Attachment is obsolete: true
Attachment #9526883 - Flags: approval-mozilla-beta?
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/569ef287466f https://hg.mozilla.org/integration/autoland/rev/6b6fbc2c8e4c remove WS_BORDER to fix border issues with Windows App SDK r=win-reviewers,handyman

When a window with WS_BORDER is maximized on a low-ish DPI monitor, an
"extra" border on top shows up. This breaks the workflow of moving your
mouse to the very top of the screen to hover over or select tabs.

(people have reported this with non-Firefox apps so I'm guessing this is
really an OS problem)

But the WS_BORDER style doesn't actually seem necessary for us when tabs
are being shown in the toolbar - removing it still means we can resize
our window, etc.

We do need to handle the case when tabs are not being shown in the toolbar,
so we have to toggle the WS_BORDER style when that changes. I tested on my
system in a number of different configurations and it seems to work fine.

I believe this will fix bug 1994918 and possibly some others.

Original Revision: https://phabricator.services.mozilla.com/D272653

Attachment #9526940 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Multiple users have reached out via Bugzilla, SUMO, and Reddit, complaining about this issue.
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: medium
  • Explanation of risk level: Changing our window styles is a little risky. I have verified this fix with my dev build locally (on Windows 11) and on a Windows 10 VM.
  • String changes made/needed: no
  • Is Android affected?: no
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/40834c6a92e4 https://hg.mozilla.org/integration/autoland/rev/84c79b9d4973 Revert "Bug 1993474 - remove WS_BORDER to fix border issues with Windows App SDK r=win-reviewers,handyman" for causing bc failures on browser_test_fullscreen_size.js

Backed out for causing bc failures on browser_test_fullscreen_size.js

Backout link

Push with failures

Failure log bc
Failure log wpt
Failure log bc

Flags: needinfo?(gstoll)

The bug is marked as tracked for firefox146 (beta) and tracked for firefox147 (nightly). However, the bug still has low severity.

:jstutte, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(jstutte)

IIUC there is a very simple workaround, that is move down the mouse a few pixels? So I'd be inclined to not rate this S2.

Flags: needinfo?(jstutte)
Flags: needinfo?(gstoll)

Jumping in to say this is nevertheless still very annoying and workflow breaking! I'd like to argue that this workaround isn't nearly good enough for this to not be prioritized.

I'd disable widget.windows.windowsappsdk.enabled for a quick fix (Because this also breaks double clicking on the sidebar with window-dragging enabled, which we desperately need for Zen, caused by the root issue of this bug) for now.

To be clear, I'm still actively working on this; I have a fix but it seems to cause some other problems relating to fullscreen/maximized windows.

Duplicate of this bug: 2000410
Duplicate of this bug: 2000762
Duplicate of this bug: 2000368
Duplicate of this bug: 2000157
Duplicate of this bug: 1999631
Duplicate of this bug: 1999626
Attachment #9526940 - Attachment is obsolete: true
Attachment #9526940 - Flags: approval-mozilla-beta?
No longer duplicate of this bug: 2000762
Blocks: 2000762
Duplicate of this bug: 2001296

Current patch is too risky for 145, we'll try to target 146.

:gstoll, I see the patch is still in progress.
This is the last week of Beta for Fx146, so there is little time left to uplift a fix if we have one.

Flags: needinfo?(gstoll)

I’m OOTO (although can hop on to do something if needed) but when I left :handyman was looking at this and thinking about the risk level.

Flags: needinfo?(gstoll) → needinfo?(davidp99)

Thanks, it's not a new bug in Fx146 so won't block.
It was just more a heads up that there is little time left.

Thanks Donal. We're going to hold off on the uplifts and instead target 147. We've got some wrinkles to iron out first.

Flags: needinfo?(davidp99)

Changing Fx146 to fix-optional. When we have a fix and some bake-time, we should uplift for a Fx146 dot release ride-along.

So I could briefly reproduce this, but after an OS update I can't anymore, can somebody confirm whether they can or can't reproduce on:

Version 25H2
OS build 26200.6899
Experience Windows Feature Experience Pack 1000.26100.253.0

?

Ok, it's back somehow. But I see what's going on.

See the comment for reasoning. WM_NCCALCSIZE wasn't getting called, and
we rely on that to get the right client area on things like maximized
windows.

nsIWidget already has a member for this.

(In reply to Emilio Cobos Álvarez [:emilio] from comment #40)

Ok, it's back somehow. But I see what's going on.

26200.6899 with Experience Windows Feature Experience Pack 1000.26100.253.0 are not the latest release versions of Win11 25H2, and the bug remains on 26200.7171 / 1000.26100.265.0 which are.

Yeah, what's going on is that the app sdk is overwriting our WNDPROC and that messes with our NCCALCSIZE handling among others.

Comment on attachment 9529537 [details]
Bug 1993474 - Ensure our WNDPROC has precedence over WinAppSDK's. r=gstoll,#win-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: See list of dupes.

  • Is this code covered by automated tests?: Yes

  • Has the fix been verified in Nightly?: No

  • Needs manual test from QE?: Yes

  • If yes, steps to reproduce: The specific configurations affected are not super clear. What worked for me was having:

  • Primary monitor with scale 150%

  • Secondary monitor with scale 100%

In such cases, putting a maximized firefox window on the second monitor always caused the issue.

  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Makes behavior more similar to pre-regression (winappsdk disabled). It'd be a one liner to back out.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9529537 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
QA Whiteboard: [uplift] [qa-ver-needed-c147/b146]

Emilio, double-checking, should both 433cc8224790 and a29551a96851 be uplifted?

Flags: needinfo?(emilio)

No need for the second patch. Doesn't hurt either tho.

Flags: needinfo?(emilio)
Attachment #9529537 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9529538 - Flags: approval-mozilla-beta+
Regressions: 2002986
QA Contact: lburuian
See Also: → 2002990

Uplift reverted in beta for causing bug 2002986, let's try to have a better fix for RC :)

Regressions: 2002990
Assignee: gstoll → emilio

Hello,
I was able to reproduce the issue on Windows 11x64, using Nightly 145.0a1 (2025-10-09) and Firefox Release 145.0.2. The Firefox tabs and the new tab button are not clickable when the cursor is at the top of the screen.
Setting widget.windows.windowsappsdk.enabled to false fixes the issue, but it also brings up the Windows photo viewer issue, where a big white line is present at the top of the screen when on an external monitor.

Verified on Windows 11x64, using the latest Nightly 147.0a1 (2025-11-28), and the issue no longer reproduces. The tabs are now accessible even when the cursor is at the very top of the screen. Setting widget.windows.windowsappsdk.enabled to false does not change anything, and the tabs are still accessible, as expected.
We will verify this in Beta as well, once the new build becomes available, and update the corresponding flags and status accordingly.

However, the issue still reproduces for the address bar and some toolbar buttons when Vertical tabs is enabled. The sidebar button, the first two buttons after it, and the address bar are not accessible when the cursor is at the top of the screen. This is not the case for the other buttons. See attached video.

Should I log a separate bug for this specific scenario, or should I reopen this bug?
Thank you.

Flags: needinfo?(emilio)
Attached video 2025-11-28_14h43_01.mp4 —

Should I log a separate bug for this specific scenario, or should I reopen this bug?

No, that is unrelated to this bug. I'd file a bug about the inconsistency of the various hit targets tho.

Flags: needinfo?(emilio)

Comment on attachment 9529537 [details]
Bug 1993474 - Ensure our WNDPROC has precedence over WinAppSDK's. r=gstoll,#win-reviewers

Adding the uplift request back since this was backed out of beta.
It's too late for Fx146 beta, but this could be changed to a release uplift request later.

Attachment #9529537 - Flags: approval-mozilla-beta+ → approval-mozilla-beta?
Attachment #9529538 - Flags: approval-mozilla-beta+ → approval-mozilla-beta?
Duplicate of this bug: 2003032
Attachment #9526794 - Attachment is obsolete: true

Comment on attachment 9529537 [details]
Bug 1993474 - Ensure our WNDPROC has precedence over WinAppSDK's. r=gstoll,#win-reviewers

Approved for 146.0rc1

Attachment #9529537 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9529538 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attached image vertical tabs fitts.png —

I'm in the beta channel and just upgraded to 146 "final" and can confirm this breaks Fitts' law for the first few buttons when in vertical tabs mode (though it also seems to work sometimes? it's very odd). Windows display scaling is set to 200%, so no weird non-integer scaling rounding error weirdness is behind this.

Verified on Windows 11x64, using the latest Nightly 147.0a1 (2025-12-01), and latest Beta 146.0 (RC1).
The issue no longer reproduces. The tabs are now accessible even when the cursor is at the very top of the screen.

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

Release Note Request (optional, but appreciated)
[Why is this notable]: This bug has a lot of duplicates (and SUMO/Reddit threads)
[Affects Firefox for Android]: No
[Suggested wording]: Fixed an issue that prevented Windows users from selecting a tab when the cursor was at the top of the screen and Firefox was maximized on some kinds of monitors.
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Duplicate of this bug: 2000762

Added to Fx146 release notes.

Regressions: 2004018

This is being reverted in 146.0rc2 for causing bug 2004018. It will remain in 147 as there is a potential fix in the works for the regressor.

No longer duplicate of this bug: 2003032
Regressions: 2003032
No longer blocks: 2000762
See Also: 2002990 →

Hello,
We have verified the fix revert in 146.0rc2, and the Firefox View button can be clicked using the topmost row of pixels in a maximized window while on a single-screen setup. However, the Firefox View button cannot be clicked when using an external monitor. (The original issue reproduces as it did before the fix.)
Thank you.

Duplicate of this bug: 2004659

Moved to the Fx147 relnotes.

See Also: → 2005229
Duplicate of this bug: 2005229
See Also: 2005229 →
No longer duplicate of this bug: 2005229
Blocks: 1996961
See Also: 1998848 →
Regressions: 2036624
Regressions: 2079588
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: