-
Notifications
You must be signed in to change notification settings - Fork 502
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
webkit destroy #296
Comments
Yeah you are correct. Maybe we need to set the CSS styling for that from the JS side instead. |
I tried that, its tricky. On initialisation of the widget, the lib checks for BROWSER_SCROLLBAR_WIDTH by comparing outer.offsetWidth to outer.clientWidth on a created div with overflow. Within that div, I think the same css rules should apply as on the actual widget. whats tricky is removing the |
@commonpike Thanks for looking at this!
Good to know, I need to run some tests to see how it behaves. |
may actually want to try |
And, this could very well be my chrome/macos, but .. I tried to set things about ::-webkit-scrollbar with javascript, but it had no effect until I said anything about ::-webkit-scrollbar in real css first. Things start working when I set, for example but then, doing that makes the scrollbar appear as a big white bar again, unless you hide it. What I'm guessing is, that the autohiding feature manipulates css from the chrome engine, and whatever you change gets overridden once the scrollbar shows or hides. setting something in the 'real' css first seems to disable the autohiding, allowing you to continue styling in javascript. But thats a guess. |
I end up doing the same as what you do for isFFWithBuggyScrollbar(). actually, i dont think its buggy. the scrollbar on that browser/os is overlapping the content, so its technically 0 px wide. Chrome does the same. Unfortunately, ff has no css to hide the scrollbar, so you guess its 14px and push it out of the container. but whatever I do, I cant properly hide / unhide the scrollbar in webkit either. So I do the same ... |
If I use the destroy method on webkit, it doesnt really restore the original scrollbar. In fact, before I activate nanoscroll, the scrollbar is already gone through the default css
.nano > .nano-content::-webkit-scrollbar { display: none; }
(what I'm trying to do, is enable nano on certain OSs only. webkit on mac has a nice scrollbar that I dont want to replace. as in
if (youwantnano) $('.nano').nanoScroller()
- but it breaks webkit)The text was updated successfully, but these errors were encountered: