WinUI 3 Window.ExtendsContentIntoTitleBar caption buttons can be clicked when mouse is not over them #7259
Labels
area-TitleBar
Issues related to custom window title bars.
bug
Something isn't working
product-winui3
WinUI 3 issues
team-Reach
Issue for the Reach team
Describe the bug
When a user presses the left mouse button down over a caption button (i.e., Minimize, Restore/Maximize, Close) in the title bar when the title bar has been customized using
Window.ExtendsContentIntoTitleBar
, the button will still be clicked even if the user has moved their mouse off of the button.Steps to reproduce the bug
Window.ExtendsContentIntoTitleBar = true
(you can use the WinUI 3 Gallery app as an example)Expected behavior
The button should not be clicked if the left mouse button is released when cursor has moved off the caption button. Additionally, the button should not appear in the pressed visual state if the cursor is not over it.
Screenshots
The expected behavior when using the standard title bar:
Good.mp4
The problematic behavior when using
Window.ExtendsContentIntoTitleBar
:Bad.mp4
NuGet package version
WinUI 3 - Windows App SDK 1.1.1
Windows app type
Device form factor
Desktop
Windows version
Windows 11 (22H2): Build 22621
Additional context
This is an important usability issue because these caption buttons behave differently from every other Windows caption buttons and has the potential to cause loss of work. If, for instance, a user inadvertently clicks their mouse button down on the close button, the window will close once they release the mouse button, and there is nothing they can do about it. The correct behavior would allow the user to move the cursor off the close button and safely release the mouse button.
Note that this issue only affects
Window.ExtendsContentIntoTitleBar
and notAppWindowTitleBar.ExtendsContentIntoTitleBar
or the default title bar.The text was updated successfully, but these errors were encountered: