ng-scrollbars
ng-scrollbars copied to clipboard
Page freezes whilst loading scrollbar
My angular app has a long loading time (15-20s!) which I identified is caused not by fetching data from API but the scrollbar loading on the page. Until the scrollbar is loaded the page freezes and is unscrollable.
I suspect this could be that as the data is loaded onto the page the scrollbar is resizing each time. The angular events for updateScrollbar do not work, is there another way to dynamically stop the scrollbar then start it when my data loads?
I have discovered the issue is caused by this line in the original js file:
return function () { return delegateMethod.apply(contextObject, arguments); }
this command runs 360 times on one page and wont allow user to scroll page until this completes. can anyone shed any light on what this does and a way to prevent it running hundreds of times?
hi @frazerwilson2, ng-scrollbars is just a wrapper around malihu-custom-scrollbar so it's possible the issue you're seeing is documented in that repo: https://github.com/malihu/malihu-custom-scrollbar-plugin
If that issue doesn't occur for the original library then there's something happening in ng-scrollbars that's causing this problem
So I had a similar issue and found, https://github.com/malihu/malihu-custom-scrollbar-plugin/issues/182 The solution that worked for me was to add the following to the config object
advanced:{ updateOnImageLoad:false }