Open j3ski opened 2 years ago
Happened to me, too.
It appeared that all events within ShadowRoot have no target
property set.
But can use event.composedPath()
to get actual target element.
I took it from here: https://stackoverflow.com/questions/57963312/get-event-target-inside-a-web-component
Looks like it could be fixed without big efforts
Hello.
I'm trying to use this library inside of a component contained in a shadow root. Once I add the
height
prop I start getting this error when scrolling.Here is the minimal reproducible example: https://codesandbox.io/s/small-sun-c5n0i?file=/src/App.js.
And here's the code
It seems that the scroll event can be triggered with a null target in this case, but I don't know exactly why.