Closed jossmac closed 6 years ago
One issue might be that if Stylesheet is added 3 times it would only inject 1 <style>
tag but if it is removed only once then it would still remove the <style>
tag for all scroll locks
@jantimon thanks for taking a look!
One tag is created by the first lock to mount -- a reference to that node is stored on the instance, so other locks don't have access to it. The behaviour then, will be that nothing changes until the last lock unmounts.
https://github.com/jossmac/react-scrolllock/pull/28/files#diff-ddf7339dc77298a220253f46c2dc6591R33
Edit: just loaded up a bunch at once, then removed -- all good 🎉