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

Div with height below 71px with buttons has a strange behavior #85

Open karkov opened 11 years ago

karkov commented 11 years ago

You can see the demo: http://jsfiddle.net/DpvTd/

The only way to solve this problem (the unexpected scroll to bottom) is remove buttons or set the height above 71px;

malihu commented 11 years ago

Yes I see. This happens because the default minimum dragger height (line 43 in jquery.mCustomScrollbar.css) is 30 pixels. With such short element height (e.g. 71px) and relatively long content inside it, the dragger is the same height as its container (or even longer), thus not being able to move and scroll to bottom (as it is already at the bottom). Try changing the height value in css to say 10px:

.mCSB_scrollTools .mCSB_dragger{ cursor:pointer; width:100%; height:10px; }

Manos

On Thu, Jul 25, 2013 at 11:58 AM, karkov notifications@github.com wrote:

You can see the demo: http://jsfiddle.net/DpvTd/

The only way to solve this problem (the unexpected scroll to bottom) is remove buttons or set the height above 71px;

— Reply to this email directly or view it on GitHubhttps://github.com/malihu/malihu-custom-scrollbar-plugin/issues/85 .

karkov commented 11 years ago

thanks, solves the problem.