microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Slider value erratically changing on mouse drag when multiple windows are open

Open BernhardMarconato opened this issue 7 months ago • 3 comments

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 = true for 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.

  1. Start the repro app
  2. Open at least one more window (the more, the easier to reproduce)
  3. Click on the initial window
  4. 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

BernhardMarconato avatar May 22 '25 17:05 BernhardMarconato

I can see the exact same issue.

elgato-tschnitzler avatar May 22 '25 17:05 elgato-tschnitzler

Issues #10357 / #10067 / #10529 and #10572 seem to be related. It needs to be fixed badly!!

wbokkers avatar May 23 '25 18:05 wbokkers

Still not fixed in 1.7.3 Please fix asap. It is the top issue our (many!) customers see in WindowsAppSDK.

wbokkers avatar Jun 12 '25 10:06 wbokkers

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.

morning4coffe-dev avatar Aug 11 '25 12:08 morning4coffe-dev

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

Hemantxk avatar Sep 10 '25 04:09 Hemantxk

It looks like the issue is fixed. Thanks!

BernhardMarconato avatar Sep 10 '25 07:09 BernhardMarconato

This issue has been fixed in 1.8-stable

niels9001 avatar Sep 10 '25 12:09 niels9001