Static GitHub Issues

[1286] scrollToTop or saveBehavior not work when use 100vh height=100% in layout

prev: PWA
next: RSS feed and sitemap

my layout default.vue

<template lang="pug">
  div
    topbar
    headbar
    channel-nav
    .container.nuxt-page-wrapper
      nuxt
    footbar
</template>

and

layout.styl
.nuxt-page-wrapper
      min-height 100vh

I use scrollToTop in page it's not work

export default {
    scrollToTop: true,
    mounted () {
      window.scrollTo(0, 0)
    }
  }

and my nuxt.config.js also not work

module.exports = {
  ...
  router: {
    scrollBehavior: function (to, from, savedPosition) {
      return false
    }
  },
  ...
}

what's going on?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1134">#c1134</a>)</em></sub></div>