malihu / malihu-custom-scrollbar-plugin

Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support etc.
http://manos.malihu.gr/jquery-custom-content-scroller
MIT License
4.11k stars 1.51k forks source link

Scrollbar flickering, adding and removing mCS_no_scrollbar when browser is zoomed in or out #646

Open jonathanblancor opened 4 years ago

jonathanblancor commented 4 years ago

When I zoom out to 80% in the browser (I only tried in Chrome) using the mouse wheel the scrollbar starts to flicker/shake adding and removing the mCS_no_scrollbar class.

It alternates between adding a scrollbar and removing it.

Please see the GIF attached. One is of the web page and the other one is of the code in DevTools. When I zoom in or out to 80% the problem happens. webpage code

Let me know if more info is needed. Thank you.

clemens1483 commented 3 years ago

Hi, you probably have long solved this issue but I just came across it on my website and found a possible solution for it: Add auto height to mCSB_container:

.mCSB_container {
  height: auto;
}

It is probably best to not use the class but rather find the id of your particular container and use that instead, e.g. you might use something like #mCSB_3_container { ... }. I hope this helps!

jonathanblancor commented 3 years ago

@clemens1483 Thank you for the reply. The error does not happen anymore when zooming out to 80%, maybe it had to do with some browser specific update.

I will have to try other scenarios, and give your solution a try.

Thank you again.