Open seleckis opened 3 weeks ago
Thank you for a perfect example, I know what to do next
update: that would take a while to update all required pieces.
In short: react-remove-scroll
should share "current document" (or just element) to react-remove-scroll-bar
, which in turn should configure react-style-singleton
to inject styles in the right place.
Right now these styles are always injected to the document of a "script", and in case operation is performed in another iframe it ends non locked.
While the change is simple, it has to be done in many places and require API update.
Wow, that fragmentation is unexpected :)
Here is an example when RemoveScroll is used inside React Frame Component. The main body is locked but iframe is not. Codesandbox