Slider value erratically changing on mouse drag when multiple windows are open
Describe the bug
When opening multiple windows in a WinUI 3 app and then dragging a thumb of a slider, the value is erratically changing between random values. It is no longer possible to reliably set a value when dragging.
See the attached recording.
- At least one of the windows seems to need to have set
ExtendsContentIntoTitleBar = truefor this to occur. - The more windows are opened, the easier it is to reproduce.
- When attaching PointerEntered/PointerExited events on the slider, you can see the mouse seems to be constantly entering and exiting the slider even though the mouse visibly stays on the slider.
- This does not only affect sliders, but any controls. For example, when hovering over a button, you can see it getting and losing hover effects constantly, even though the mouse is not physically moving.
- When selecting a window from another process, and then selecting the window in the WinUI 3 app again, the problem disappears completely.
- This is also reproducible in the WinUI 3 Gallery app.
Reproducible in 1.7.2 and also 1.8-experimental-2.
Steps to reproduce the bug
Use repro app: https://github.com/BernhardMarconato/WinUIMultipleWindowSliderBug
It contains a window with ExtendsContentIntoTitleBar = true, a slider, and a button to open another window of the same class.
- Start the repro app
- Open at least one more window (the more, the easier to reproduce)
- Click on the initial window
- Drag the slider around without releasing it
Expected behavior
The slider value is changed to the expected value instead of changing erratically.
Screenshots
https://github.com/user-attachments/assets/5e3461e6-d16b-41a3-b364-d4337d7c91f0
NuGet package version
WinUI 3 - Windows App SDK 1.7.2: 1.7.250513003
Windows version
Windows 11 (24H2): Build 26100
Additional context
No response
I can see the exact same issue.
Issues #10357 / #10067 / #10529 and #10572 seem to be related. It needs to be fixed badly!!
Still not fixed in 1.7.3 Please fix asap. It is the top issue our (many!) customers see in WindowsAppSDK.
There are a few related issues in MAUI on Windows, which should be fixed by this as well: https://github.com/dotnet/maui/issues/27430 and https://github.com/dotnet/maui/issues/30536.
We have fixed a related flickering issue caused by setting ExtendsContentIntoTitleBar to true. It should be available as part of WindowsAppSDK 1.8- https://www.nuget.org/packages/Microsoft.WindowsAppSDK/1.8.250907003. Please test the scenario against this version & let us know if it works. Feel free to re-open this issue if bug still persists. @BernhardMarconato @wbokkers
It looks like the issue is fixed. Thanks!
This issue has been fixed in 1.8-stable