New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernizr detecting stylable scrollbars incorrectly #2248
Comments
I'm seeing this same issue with 3.5. Chrome is returning |
Stepping through the |
I just updated Chrome (to 87.x) and find this happening when it's within an iframe. Anyone else running into this? |
Hi @onassar 👋 |
Yep when it's hidden. This was working okay before hand :( |
I'm using Modernizr to choose to hide all scrollbars when a page is being viewed in firefox. This is because I've styled the scrollbars using webkit's ::-webkit-scrollbar selectors and haven't found a suitable alternative for firefox.
Since it's best practice to keep from using the User Agent String, I'm following the most common recommendation to use Modernizr for feature detection instead of browser detection.
I'm using the CSS Stylable Scrollbars property (cssscrollbar). That's supposed to return true for everything except firefox, but instead returns false for all browsers for me. (including Chrome and Safari, for which we have the scrollbars styled and working).
Other than including the custom-modernizr.js file in the header of the site and using it in javascript I'm not sure what other code is worth sharing, but I've got to be choosy with the code I share because it's for work.
Here's the bit where I check:
Any ideas to fix Modernizr, or another way to determine when to remove the scrollbars?
The text was updated successfully, but these errors were encountered: