Skip to content

SDK v1.8.0: Hovering on modal window triggers pointer events of the owner window's button #10758

@d2phap

Description

@d2phap

Describe the bug

I have a button to open a modal window with OverlappedPresenter using AppWindow, the mouse pointer of the button is still captured, and its events (PointerEntered and PointerExited) are constantly triggered when the modal window is opened.

Why is this important?

  • PointerEntered and PointerExited event of the button are triggered constantly
  • Clicking the buttons from the modal window is sometimes not triggered (because the mouse pointer is still captured by the original button)

Steps to reproduce the bug

This can reproduce with WinUI 3 Gallery

  1. Open WinUI 3 Gallery, go to Windowing > AppWindow
  2. Click the "Show modal window" button
  3. Move cursor to the modal window
  4. The "Show modal window" button is flashing (it's a bit hard to see because of the button background)
  5. The issue stops only if you move your cursor out of the owner window, or make it lost focus

Actual behavior

The "Show modal window" button is flashing (it's a bit hard to see because of the button background)

Expected behavior

  • The "Show modal window" button is not flashing
  • The "Show modal window" button does not trigger PointerEntered and PointerExited event

Screenshots

Please look closely to the background of the "Show modal window" button, it's a bit hard to see because of the button background.

Recording.2025-09-06.120758.mp4
Image

NuGet package version

WinUI 3 - Windows App SDK 1.8.1

Windows version

Windows 11 (24H2): Build 26100

Additional context

The issue can be reproduced with WinUI 3 Gallery v2.7.0, see the video here: #10758 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions