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

    q-loading and scollIntoView

    Help
    4
    6
    269
    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.
    • Q
      qjh last edited by

      If I use q-loading, I can’t use scrollIntoView() method. Any advice? Thanks!

      this.$q.loading.show()
      this.$q.loading.hide()
      
      this.$nextTick(() => {
        if (this.$route.hash) {
          const el = document.querySelector(this.$route.hash)
          el && el.scrollIntoView()
        }
      }
      
      1 Reply Last reply Reply Quote 0
      • J
        jadedRepublic last edited by

        Did you add to your plugins In Quasar.conf? plugins: [‘Loading’]

        1 Reply Last reply Reply Quote 0
        • Q
          qjh last edited by

          Yes, I did. Loading part works, but I could not make scrollIntoView() work.

          1 Reply Last reply Reply Quote 0
          • Q
            qjh last edited by

            the el is selected fine. But the scrolling does not happen.

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @qjh last edited by

              @qjh if you make a marking codepen example it would be easier to help find the problem.

              1 Reply Last reply Reply Quote 0
              • K
                khalilm last edited by

                I found that I had this problem as well. I believe (though don’t quote me on this) that according to the documentation there is a 500ms delay to prevent flicker. I am not sure if this is the case when it is hidden. Regardless, but if a delay of 500ms is introduced before calling the scrollIntoView function it works. Although in my case I was using the Scroll Utils to do the scrolling.

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