Conversation
Implement CSS-like stacking context behavior for pointer events: - Events now dispatch to views based on visual z-index order, not DOM order - Higher z-index views receive events before lower z-index siblings - Stacking contexts are properly bounded (child z-index doesn't escape parent)
Collaborator
|
I have some changes that will mostly overwrite this. I have redone the event handling and it is now significantly more robust and respects z index and also has explicit phases for capture, target and bubble. It also does hit testing using a spatial index so no more need to slowly walk the view tree for hit testing. In the changes I have, events are still dispatched in dom order, but the event context caries the visual hit path so an event handler can see/use the visual order if desired |
Contributor
Author
|
Do you want to push it and let's take a look? |
Collaborator
|
draft in #998. The event handling is in src/context/event.rs. needs a bit more work to make propagation work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement CSS-like stacking context behavior for pointer events: