fix blocking all scrolling when RemoveScroll is used within ShadowRoot#98
Conversation
|
Looks brilliant 👍 . Give me some time to test it |
| let availableScrollTop = 0; | ||
|
|
||
| do { | ||
| if (target instanceof ShadowRoot) { |
There was a problem hiding this comment.
"when" this happens?
Description of commit is about "mobile", but how it's related?
There was a problem hiding this comment.
If the event comes from within a ShadowRoot, then the target's .parentNode() up the tree will eventually be the ShadowRoot, and we need to step out of it with .host (because a ShadowRoot's parentNode is null). I'm not exactly sure why this fixes it, but touch scrolling doesn't work without this in my use case. I already wanted to do this regardless, because it seems like the "right" thing to do with regards to ShadowDOM, but it also ended up fixing the issue on mobile.
|
Sorry for delay. Found a few issues with math and it took some time to find the root cause. |
|
Released as a part of v 2.5.7 |
This PR fixes issue #45 as per the discussion in #97