Skip to content

Conversation

@ofersadgat
Copy link

findMonitorsAndReceiverInRegistry will look through the registry viewIds and return the last receiver which matches. the problem here is that this assumes that the order of receiver ids in the registry viewIds is bottom to top. this is not always the case when you have various receivers re-rendering for various reasons. this resulted in a non-deterministic receiver being called on drop instead of the top most one. in order to fix this, I added a resolution algorithm in the case that multiple receivers overlap the target point. the resolution algorithm solves the issue first by looking through the parent tree and removing all parents. while I believe this should be enough, for safety, I added an additional fallback measure which chooses the receiver with the smallest area as generally things on top should be smaller than things on bottom.

@lafiosca lafiosca added bug Something isn't working enhancement New feature or request research For issues which require additional research work gestures Related to gesture handling labels Sep 17, 2024
@lafiosca
Copy link
Member

This is a great find and I appreciate the work and PR. I have not been actively maintaining this library for a long time, and unfortunately there is no current maintainer. Additionally, I am in the process of winding down Nuclear Pasta and have been considering what I should do about this library. I will take a look and see if I can merge this and publish a new version, but I want to set expectations that it might take me a while to get to it.

@lafiosca lafiosca self-assigned this Sep 17, 2024
Copy link
Member

@LunatiqueCoder LunatiqueCoder left a comment

Choose a reason for hiding this comment

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

I don't think the build folder should be commited?

@ofersadgat
Copy link
Author

@LunatiqueCoder sorry about that, I'll fix it when the rest of the MR gets reviewed.

@LunatiqueCoder
Copy link
Member

do you have a reproduction example to test the changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request gestures Related to gesture handling research For issues which require additional research work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants