estrattonbailey / noodle

1.8kb flickable slideshow
https://noodle.now.sh/
45 stars 1 forks source link

Firefox #3

Closed dav11d closed 5 years ago

dav11d commented 5 years ago

Yo!

Seems there is a fatal error with Firefox -

Touch holding the gallery and dragging/flicking left and right causes the page to crash. Firefox 67 (windows)

estrattonbailey commented 5 years ago

@dav11d hey there, good to know. Do you have any other details about the issue? Any errors, or a link to the site that it's occurring on?

dav11d commented 5 years ago

@estrattonbailey

It's happening across all instances I can find (in the example noodle.now.sh as well as dimshome, and a personal project, across 2 different windows systems)

Error: Script terminated by timeout at: t.default/<@https://noodle.now.sh/index.js:11:11132 i@https://noodle.now.sh/index.js:11:10070 n@https://noodle.now.sh/index.js:11:9526

as far as I can tell, the debugger/browser is pointing to following function causing one of the issues

https://github.com/estrattonbailey/noodle/blob/14b4513c33604506d192d83b4ac550cc555f046c/index.js#L289-L296

estrattonbailey commented 5 years ago

@dav11d hey thanks! This is great info, super helpful. You're right, it's definitely that while loop.

Are you doing anything in particular to reproduce this every time? I've been able to make it happen, but I'm just dragging back and forth until it does. Haven't found a pattern yet. Browserstack is also super slow 🙄

estrattonbailey commented 5 years ago

I think I've got this sorted. Was actually an issue with the move handler where velo is set. Sometimes the previous and current timeStamp would be the exact same number of milliseconds, so my velocity calculation was dividing by 0. I updated this to ensure that elapsed time is always a positive number, which should solve this issue.

I've updated the demo as well, you should see v1.8.1 in the title bar and in the console.

dav11d commented 5 years ago

🎉🎉🎉

estrattonbailey commented 5 years ago

@dav11d thanks for your help!