inuyaksa / jquery.nicescroll

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

.hide() only works on 2nd trigger #675

Open Joogy opened 7 years ago

Joogy commented 7 years ago

I really like nicescroll however I am having a problem with disabling it while I open a modal. When I open a custom modal I hide the nicescroll of the body, however the the scroll in the body still works but when I close the modal and open it again the scroll in the body is disabled(it wont scroll). So basically getNiceScroll().hide() only works when It is being called the second time I tried calling it twice to prove my theory however its not working so I am seeking for some help heres a short demo clip

https://www.screencast.com/t/TqP8EJkQuSO

in the video I opened the facebook modal twice and the scroll was disabled in the second time when I open twitter and facebook simultaneously the scroll wont disable

inuyaksa commented 7 years ago

Thanks, do you use last version 3.7.4 ?

In the meanwhile you can set locked properties to prevent page scroll.

getNiceScroll(0).locked = true/false

Joogy commented 7 years ago

Yes I am using the latest version and that worked thank you :)

On Jul 4, 2017, at 3:11 PM, Inuyaksa notifications@github.com<mailto:notifications@github.com> wrote:

Thanks, do you use last version 3.7.4 ?

In the meanwhile you can set locked properties to prevent page scroll.

getNiceScroll(0).locked = true/false

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/inuyaksa/jquery.nicescroll/issues/675#issuecomment-312798779, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARJMWUbNqe7Uts4Vsxd0ruabnkmr4UQiks5sKeW4gaJpZM4OM9gp.