Skip to content

Commit

Permalink
Updated docs for restoring scroll position
Browse files Browse the repository at this point in the history
Fixes #155
  • Loading branch information
ItalyPaleAle committed Oct 29, 2020
1 parent 560928d commit 87bb97c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Advanced Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,5 @@ To enable that, set the `restoreScrollState` property to `true` in the router (i
```svelte
<Router {routes} restoreScrollState={true} />
```

**Important:** In order for the scroll position to be restored, you need to trigger a page navigation using either the `use:link` action or the `push` method. Navigating using links starting with `#` (such as `<a href="#/books">`) will not allow restoring the scroll position.

0 comments on commit 87bb97c

Please sign in to comment.