jamesflorentino / nanoScrollerJS

A jQuery plugin that offers a simplistic way of implementing Lion OS scrollbars.
http://jamesflorentino.github.com/nanoScrollerJS/
MIT License
2.69k stars 502 forks source link

Reset set bad height when .nano is not visible #269

Closed deather closed 10 years ago

deather commented 10 years ago

When using nanoscroller in an element is not visisble and have a max-height property, the .nano element have a bad height (0px). The cause is when an element is not visible his scrollHeight property is set to 0. I experience this issue on Firefox and Google-chrome.

I create a jsfiddle to illustrate my words.

kristerkari commented 10 years ago

Hello,

I don't know if I understand your problem correctly, but if nanoScroller is hidden, the browser can not calculate correct height values. That is why you should not refresh nanoScroller when the element is hidden, but after the element is visible again. If your bug report is about something else, then let's try to get it fixed :)

deather commented 10 years ago

In writing another example, I read the documentation with more attention and I found the option disableResize that solved my problem. Sorry for the trouble. Thanks for your response