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

Update: ensure mouse events are on shadow root #12

Merged
merged 4 commits into from
Nov 20, 2020

Conversation

stevematney
Copy link
Contributor

This is to support react components that use the onMouseDown, or
onMouseUp. Currently these events are still being attached to the
document instead of the shdaow root

This is to support react components that use the onMouseDown, or
onMouseUp. Currently these events are still being attached to the
document instead of the shdaow root
Comment on lines +62 to +66
set retargetCleanup(cleanupFunction: () => void) {
// Ensure that we cleanup an old listeners before we forget the cleanup function.
this.retargetCleanup();
this.retargetCleanupFunction = cleanupFunction;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still need to run this setter when we call retargetReactEvents.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought I had done that. I guess I thought about it too much, but never did add the setters. Okay so this should work now.

@stevematney
Copy link
Contributor Author

It looks like this is failing to build.

I had accidentally left in a test to adding onClick. We do not want this
functionality as the current system for retargeting works for clicks
Also added node modules to be excluded from tsconfig
@stevematney
Copy link
Contributor Author

Since I opened this PR, I can't approve it, but with Joseph's approval (and my unofficial approval), I'm merging. 😄

@stevematney stevematney merged commit 5dd5879 into master Nov 20, 2020
@stevematney stevematney deleted the ensure-mouse-events-retarget branch November 20, 2020 18:08
@aabenoja
Copy link
Contributor

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 this pull request may close these issues.

None yet

4 participants