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

Data grid handled events #13680

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Conversation

ltetak
Copy link
Contributor

@ltetak ltetak commented Nov 21, 2023

What does the pull request do?

There was a breaking change in Avalonia 11.0 where some events can't be canceled (#9918). This PR tries to fix DataGridCell PointerPressed.

What is the current behavior?

You can't handle the event in a way that would prevent the bubbling. It was handled before on the framework level. Now this needs to be handled by each component.

What is the updated/expected behavior with this PR?

If the event has been handled the bubbling should be canceled.

Checklist

Breaking changes

I don't think there should be any raised handled event that should be still taken into account for this.

Obsoletions / Deprecations

Fixed issues

@ltetak
Copy link
Contributor Author

ltetak commented Nov 21, 2023

Another solution would be to remove the handledEventsToo: true flag.

@ltetak
Copy link
Contributor Author

ltetak commented Nov 22, 2023

I forgot to add a motivation for this. Avalonia has a weird behavior where when I select multiple items in the DataGrid and then I would like to drag all items, they are deselected first. This deselection is caused by mouse down even before the app realizes I am dragging. It should happen on mouse up. It was possible to workaround this, but after this change, it can't be done.

@jmacato jmacato requested review from grokys and maxkatz6 November 24, 2023 05:59
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Nov 25, 2023
@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 29, 2023
@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 29, 2023
Merged via the queue into AvaloniaUI:master with commit 6d1fd9f Nov 29, 2023
maxkatz6 pushed a commit that referenced this pull request Dec 5, 2023
* DataGridCell - ignore handled events

* DataGridCell - ignore handled events

* revert
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants