perfect-scrollbar
perfect-scrollbar copied to clipboard
iOS swipe-back on safari crashes the browser
After using perfect-scrollbar for a couple of months now, we noticed a crash in our logs on iOS/iphone devices.
namely; null is not an object (evaluating 't.scrollTop') at w.
after some investigation we found out that this is being called from the update-geometry.js method. The method is being called from applyTouchMove which in turn is being called from touchEnd.
After this i can see the stack going into the polyfill.ts, if additional info is needed let me know.
To reproduce this issue; Route towards a page with perfect-scrollbar on an iphone device ( tested with iOS 11 and 10). Swipe to go back to the previous page ( timing is important here, does not always happen ). iOS 11 now freezes the browser ( safari ) iOS 10 keeps on throwing exceptions but does not freeze the browser ( safari ) Sometimes it also happens that it just re-opens the browser
If need be, I have a video of the issue, but it contains sensitive data so can not link it here.
Sincerely,
Corné
Yes, we have the same issue (v1.4.0)
This fix works for me...
if (!element) { return; }...
P.S. I had to fork v1.4.0.
Has this been somehow resolved?