-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
Description
I've been noticing that ElementScrollRestoration does not work on iOS Safari, or at least not reliably. I could pinpoint the issue to useBeforeUnload not being triggered due to window.onbeforeunload not being supported. There have been similar reports for react-router-dom (remix-run/react-router#9463), which have been fixed by switching to listening to window.pagehide (remix-run/react-router#9945). Monkey patching or rather just forking ElementScrollRestoration and adding and using the usePageHide hook fixes these problems for me. If this is a known bug that does not only affect me for some reason, I'd be happy to help out with a pull request.