Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer release not observed on Mac if pointer press opened a modal window #14525

Closed
TomEdwardsEnscape opened this issue Feb 7, 2024 · 0 comments · Fixed by #16205
Closed
Labels

Comments

@TomEdwardsEnscape
Copy link
Contributor

Create this button in a window:

var button = new Button
{
    Content = "Click me",
    ClickMode = ClickMode.Press,
    Margin = new(100),
};
button.Click += delegate { new Window().ShowDialog(this); };
  1. Click the button on Mac.
  2. Close the window
  3. Click outside the button

At step 2, you will see that the button is still in its "pressed" state.

At step 3, the Click event handler will execute even though you didn't click on the button. This is because the button is still capturing the mouse pointer.

Expected behavior

The button registers pointer release and behaves in the same way as it does on Windows.

Environment

  • OS: Mac OS
  • Avalonia-Version: 11.0.7
grokys added a commit that referenced this issue Jul 1, 2024
grokys added a commit that referenced this issue Jul 2, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 3, 2024
* Added integration test for #14525.

* Release mouse capture when dialog shown.

Fixes #14525.

* Release X11 pointer capture when dialog shown.
Gillibald pushed a commit to Gillibald/Avalonia that referenced this issue Jul 29, 2024
* Added integration test for AvaloniaUI#14525.

* Release mouse capture when dialog shown.

Fixes AvaloniaUI#14525.

* Release X11 pointer capture when dialog shown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant