inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.66k forks source link

.nicescroll-cursors height and position don't always update, but .nicescroll-rails does #706

Open carawil opened 7 years ago

carawil commented 7 years ago

I have a fixed position left column in which I use NiceScroll. This div resizes in height based on whether the site footer is in view or not. After scrolling to the bottom of the page .nicescroll-rails always resizes perfectly to adapt to the new height, but the .nicescroll-cursors bar itself often doesn't. I've tried adding $("#leftColumn").getNiceScroll().resize(); after the left column resize, but the problem persists.

Interestingly I noticed that when the error happens if I hover over the left column, without scrolling any content, .nicescroll-cursors corrects its height and shifts back to the correct place. Is there something I can call in my code that will do the same thing?

I've been using version 3.6.8, but updated to use version 3.7.6 and this issue still occurs. I'm using the latest versions of Chrome, Firefox and Safari. It happens on PC and Mac.

rejowanahmed commented 4 years ago

See the question below. There are two answers and both work for me. Basically, I have applied the second method(See the second answer) suggested there. Because, it works instantly and the first method doesn't seem to work instantly after the div has been resized.

https://stackoverflow.com/questions/11862656/jquery-nice-scroll-not-working/11876895