Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: navigation & scroll issue in Safari by upgrading to Svelte 4 wit…
…h default local transitions Caused by global transitions blocking the onDestroy of the old page, which left its nodes in the DOM for 300 ms (probably) after the onMount of the new page triggered. The new page is thus added below the old one (commonly reported issue). This resulted in the onMount ephemerally getting a far too high offsetTop value for the pricing section (because the old page content was still on top), which in turn made the scroll animation scroll to the end of the page instead. Svelte 4 defaults to local transitions. It's still possible that some local "out" transition blocks the destroy of an old page, but for now, it seems to be fixed, because (now local) transitions on the home page are sufficiently nested. All transitions were by default"global" before, I couldn't easily check the behavior of all global -> local migration cases. It's possible this fix causes a problem elsewhere. However, keeping the "local" default seems preferrable, since "global" lead to this bug.
- Loading branch information