[docs] explain initial value for bind scroll (#7065)

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
pull/7738/head
Bjorn Lu 5 years ago committed by GitHub
parent aa97f0c3f7
commit 233dfc3eb0

@ -1671,6 +1671,7 @@ All except `scrollX` and `scrollY` are readonly.
<svelte:window bind:scrollY={y}/> <svelte:window bind:scrollY={y}/>
``` ```
> Note that the page will not be scrolled to the initial value to avoid accessibility issues. Only subsequent changes to the bound variable of `scrollX` and `scrollY` will cause scrolling. However, if the scrolling behaviour is desired, call `scrollTo()` in `onMount()`.
### `<svelte:body>` ### `<svelte:body>`

Loading…
Cancel
Save