mikesol / deku-documentation

Documentation for the purescript-deku project
https://deku-documentation.vercel.app
Other
9 stars 5 forks source link

App intermittently freezes on iOS, locking up browser #6

Closed baffalop closed 1 year ago

baffalop commented 1 year ago

I've been reading the documentation on Chrome on iOS, and eventually the app gets into what I'm guessing is an infinite loop: nothing is responsive (though pages are still scrollable), and even when I press to refresh, the browser hangs forever with a loading bar, without unloading the page. I have to close the tab and reopen the page in a new tab.

I haven't been able to find a specific trigger for this. It happens intermittently, but seems to happen eventually—after reading through a couple of pages or so.

mikesol commented 1 year ago

Confirmed - I tried it on iOS Safari and it works fine, but on iOS Chrome it gets into a frozen state after flipping through a few pages. It works fine on Chrome Android, Chrome Mac, Chrome Linux and Chrome Windows though 🤔

My guess is that there's an animation that's not canceled somewhere, although if that were the case, it'd also theoretically persist on these other platforms, but the performance tab does not show any animation loop running.

It'd be good to identify the cause, as there are several mobile HTML5 games that have been developed with Deku. None of them have hit this problem yet, but they all theoretically could. I'll give it a proper look this week and hopefully will find the root cause. Thanks for reporting it!

baffalop commented 1 year ago

@mikesol I would not have thought that Chrome on iOS would have wildly deviating behaviour from any other browser on iOS! Maybe I'm wrong, but my understanding is that on iOS every browser fundamentally uses the Safari webview with a thin wrapper...

Good luck!

mikesol commented 1 year ago

This has now been fixed - the issue was an infinite loop caused by the sidebar scrolling algo.