Is your feature request related to a problem? Please describe.
We are developing something that uses a shadow dom, but it seems like this project doesn't work fully inside of a shadow dom.
If I understand the code correctly, chrome on desktop shouldn't have a 30px border-right and right on 2 of the os content wrappers, but that is what we see inside of the shadow dom, so at the very least it seems like the detection that exists to determine if those styles should be applied doesn't work correctly inside a shadow.
This basically means that without adding our own code, we end up with different gaps between the content of the scrollable area and the scrollbar for different browsers.
What we have ended up doing in the meantime is calculating the width of the scrollbar on our own, and adding a margin to our content based on that calculation, which works, but having it work built in would be more convenient.
I don't know if there are other things not working as intended, this is just the one that we've noticed.
Also, to make it more convenient to use, it would be nice to be able to easily import the JS as a module. We have a workaround for that right now as well.
Describe the solution you'd like
Support for use inside of a shadow dom, and a JS file that can be imported as a module.
Describe alternatives you've considered
As mentioned, We currently determine the width of the scrollbar ourselves and add a CSS style to account for it.
For importing the JS, we are adding the script tag for that into an iframe, and a promise gives us back the OverlayScrollbars function (a frame is used because our product is embedded onto customer sites, and we are trying to not pollute their global scope).
Is your feature request related to a problem? Please describe.
We are developing something that uses a shadow dom, but it seems like this project doesn't work fully inside of a shadow dom.
If I understand the code correctly, chrome on desktop shouldn't have a 30px
border-rightandrighton 2 of the os content wrappers, but that is what we see inside of the shadow dom, so at the very least it seems like the detection that exists to determine if those styles should be applied doesn't work correctly inside a shadow.This basically means that without adding our own code, we end up with different gaps between the content of the scrollable area and the scrollbar for different browsers.
What we have ended up doing in the meantime is calculating the width of the scrollbar on our own, and adding a margin to our content based on that calculation, which works, but having it work built in would be more convenient.
I don't know if there are other things not working as intended, this is just the one that we've noticed.
Also, to make it more convenient to use, it would be nice to be able to easily import the JS as a module. We have a workaround for that right now as well.
Describe the solution you'd like
Support for use inside of a shadow dom, and a JS file that can be imported as a module.
Describe alternatives you've considered
As mentioned, We currently determine the width of the scrollbar ourselves and add a CSS style to account for it.
For importing the JS, we are adding the script tag for that into an iframe, and a promise gives us back the OverlayScrollbars function (a frame is used because our product is embedded onto customer sites, and we are trying to not pollute their global scope).