No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Scroll behaviour when using Prefetch + ssr

    Framework
    2
    3
    214
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hosseiny last edited by hosseiny

          scrollBehavior: () => ({ x: 0, y: 0 }),
      

      ScrollBehaviour was working as expected, navigating the user to the top on route entry.

      However, after implementing preFetching this behaviour doesn’t work any more. instead, the scroll posiition is preserved from the previous router.
      Any idea why this is happening?
      EDIT: After further debugging the problem seems to be related to quasar Loading plugin
      this is the prefetch hook where I call Loading

        preFetch({ store }) {
          Loading.show();
          return store.dispatch("getDoctors").then(success => {
              Loading.hide();
          });
        },
      
      1 Reply Last reply Reply Quote 1
      • A
        abner last edited by

        I have the same problem

        1 Reply Last reply Reply Quote 0
        • H
          hosseiny last edited by

          I noticed they are using preventScroll in the Loading.js file and this is apparently the bug source, when I removed it to test, the scrolling worked as expected

          1 Reply Last reply Reply Quote 0
          • First post
            Last post