react-remove-scroll
react-remove-scroll copied to clipboard
RemoveScroll is broken inside a shadow dom
Elements inside of RemoveScroll doesn't scroll when React is mounted inside a shadow dom. I've reproduced the issue here:
https://codesandbox.io/s/cranky-solomon-ox8po?file=/src/App.js
Same for the other way around. If the scrollable area is inside a custom element with shadow DOM with is a child of RemoveScroll, it won't work.
Thanks for the use case easy to reproduce. It's not clear which logic is preventing the scroll, but there are a few places obviously not compatible with shadow dom concepts.
I believe I have also run into this issue using chakra modal in a shadow dom
using radix-ui/react-select in shadow dom and having the same issue
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.
This is still an issue π
I am also having this issue. When attempting to remove scroll from everything outside of a dropdown component It removes scroll on the conditionally mounted dropdown component.
Also having this issue.
Still a problem here
Can anyone give me a hand? π Any help would be quite appreciated.
Can anyone give me a hand? π Any help would be quite appreciated.
@theKashey Hi, I think I managed to fix this in PR #97
Update example provided by @circlingthesun to use v.2.5.7 - https://codesandbox.io/s/dreamy-paper-dd269d And look like it solves the problem.
All kudos goes to @csorfab, without their efforts this issue will be unsolved for another year π