Closed Bug 1882727 Opened 7 months ago Closed 7 months ago

Clicking the window corner can accidentally close the window with CSD titlebar due to lack of window control hitbox padding compared with native titlebar

Categories

(Core :: Widget: Gtk, defect)

Firefox 125
Unspecified
Linux
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox-esr115 --- unaffected
firefox123 --- unaffected
firefox124 --- unaffected
firefox125 --- wontfix

People

(Reporter: ke5trel, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: dataloss, regression, ux-consistency)

Attachments

(1 file)

STR:

  1. Have the CSD titlebar enabled on Ubuntu 23.10.
  2. Unmaximize the window and click the top-right window corner edge to resize the window but miss by a pixel on the inner side.

Expected:
Nothing happens.

Actual:
Window closes unexpectedly with data loss.

The CSD window control hitboxes have 0px padding from the edges which is inconsistent with Ubuntu 23.10 native window controls which have about 6px padding for both unmaximized and maximized windows. This padding helps to prevent accidentally closing the window and losing data when resizing the window or when the cursor is bumped into the screen corner and clicked by accident.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9f62179225e566f2c04148edbe228a68d9e4e430&tochange=f0fd4d27a58991220e91d1c086442a03b0a52117

Regressed by Bug 1560702.

That was kind of the point of bug 1560702... Martin, thoughts? We could trivially add this padding but then we'd regress that bug.

Flags: needinfo?(stransky)

May we enable the extended button area to maximized/tiled windows only?

Flags: needinfo?(stransky)
Flags: needinfo?(emilio)

I'll do a bit of testing across DEs / platforms.

Anyway, current behavior looks okay to me, resize on upper corner works as expected and the bigger close are looks fine too.
I'd leave it as is. If you fiddle with mouse around close button, you can expect window close anyway.

You don't always have a choice of which corner to resize from, sometimes the top-right corner is the only one available.

There is no need for unmaximized window controls to have hitboxes that go right to the window edges and for maximized windows it should at least be consistent with the system to avoid surprises. Preventing accidental data loss should take priority over the UX inconvenience of a smaller hitbox.

So:

  • All browsers on Windows (and all windows apps generally) behave like this (close button covers the whole corner).
  • All browsers on macOS (and all macOS apps) have some padding to the side of the titlebar button.
  • Chromium on Linux behaves like Nightly.
  • GTK and KDE native titlebars don't cover the whole corner tho.

Edge on Linux also behaves like Nightly, effectively.

I think we either WONTFIX this or revert to the previous behavior. I'll try to check with UX.

Dao, do you have strong opinions given comment 6.

Flags: needinfo?(emilio) → needinfo?(dao+bmo)

Tested this manually, the current behavior seems okay. It seems unlikely many people will accidentally close windows here.

Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(dao+bmo)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: