Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 95492f7

Browse files
galvezSébastien Chopin
authored and
Sébastien Chopin
committed
add note about scrollToTop: false (#1069)
1 parent 1248896 commit 95492f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

en/api/pages-scrolltotop.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: The `scrollToTop` property lets you tell Nuxt.js to scroll to the t
99
1010
- **Type:** `Boolean` (default: `false`)
1111

12-
By default, Nuxt.js scrolls to the top when you go to another page, but with children routes, Nuxt.js keeps the scroll position. If you want to tell Nuxt.js to scroll to the top when rendering your child route, set `scrollToTop: true`:
12+
By default, Nuxt.js scrolls to the top when you go to another page, but with children routes, Nuxt.js keeps the scroll position. If you want to tell Nuxt.js to scroll to the top when rendering your child route, set `scrollToTop` to `true`:
1313

1414
```html
1515
<template>
@@ -23,4 +23,6 @@ export default {
2323
</script>
2424
```
2525

26+
Conversely, you can manually set `scrollToTop` to `false` on parent routes as well.
27+
2628
If you want to overwrite the default scroll behavior of Nuxt.js, take a look at the [scrollBehavior option](/api/configuration-router#scrollBehavior).

0 commit comments

Comments
 (0)