perfect-scrollbar icon indicating copy to clipboard operation
perfect-scrollbar copied to clipboard

iOS swipe-back on safari crashes the browser

Open CorneThoes opened this issue 6 years ago • 3 comments

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é

CorneThoes avatar Oct 26 '18 10:10 CorneThoes

Yes, we have the same issue (v1.4.0)

deprecatednw avatar Jan 03 '20 09:01 deprecatednw

This fix works for me...

if (!element) { return; }...

P.S. I had to fork v1.4.0.

deprecatednw avatar Jan 18 '20 18:01 deprecatednw

Has this been somehow resolved?

jakubbloksa avatar Feb 26 '21 11:02 jakubbloksa