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

Improve input behavior for Browser #18349

Merged

Conversation

johanpolson
Copy link
Contributor

What does the pull request do?

Improve input behavior for Browser, By change so we only call on preventDefault if handled is false.

#18348

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason it didn't call preventDefault was due to multithreading support. Which requires all C# code executed from the JS to return a promise/task. And preventDefault must be called in the same scope, without returning from the event or switching to another task.

But this PR makes sense at least for single-threaded applications, where this promise will end immediately without waiting.

@maxkatz6 maxkatz6 added bug os-browser backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Mar 1, 2025
@MrJul MrJul enabled auto-merge March 9, 2025 09:27
@MrJul MrJul added this pull request to the merge queue Mar 9, 2025
Merged via the queue into AvaloniaUI:master with commit 156f587 Mar 9, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch bug os-browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants