inuyaksa / jquery.nicescroll

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

hide() not working properly after updating from 3.4.0 to 3.7.6 #746

Open vomatec opened 6 years ago

vomatec commented 6 years ago

Hello, After updating from 3.4.0 to the latest one 3.7.6, I am facing two issues.

Scenario: In a single page application, one page has multiple nicescroll bars assigned with data tables and when switch to another pages via a side menu, these scroll bars are hidden via hide() on other pages.

  1. Based on the scenario described above, hide() was working before updating the plugin. However, after updating the plugin, it does not work properly. For example: I am on page A which has multiple scrollbars, now I switch to page B via a click event on side menu. On click, I hide the all the scrollbars via hide() and initialize the contents of page B. In this scenario, hide() works if I use setTimeout('scrollbar divs'.getNiceScroll().hide(), 2000) or if I do not initialize the contents of page B, just empty page. However, with initializing the contents of page B, the scrollbars of page A are visible on page B (see the image below).

unbenannt

  1. Another issue is the width of the 'nicescroll-rails' is kind of equal to 2 px + width of 'nicescroll-cursors'. Before updating the width of both divs was same as I set 2 px but now it is not. These extra 2 px are added somewhere in the new updates of plugin. Any idea how to get rid of these extra px?

Did anyone face the same issue or any idea what should be done to fix this?

Thank you!