-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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
set retargetCleanup(cleanupFunction: () => void) { | ||
// Ensure that we cleanup an old listeners before we forget the cleanup function. | ||
this.retargetCleanup(); | ||
this.retargetCleanupFunction = cleanupFunction; | ||
} |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
42f33fe
to
9b5cdea
Compare
It looks like this is failing to build. |
9b5cdea
to
49615d1
Compare
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
266afce
to
163b178
Compare
Since I opened this PR, I can't approve it, but with Joseph's approval (and my unofficial approval), I'm merging. 😄 |
🎉 This PR is included in version 2.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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