question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No errors yet not working

See original GitHub issue

Hello and congrats again on a great module. However i can’t get it to work. Is this an error on my part?

I’m using webpack base config. I am loading the module in the main.js file like so:

import Vue from 'vue'
import App from './App'
import router from './router'
import VueScrollTo from 'vue-scrollto'

Vue.config.productionTip = false

Vue.use(VueScrollTo)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})

and in app.vue i am trying to programmatically move it as i was not able to do it either with simple buttons either:

import Vue from 'vue'
import VueBar from 'vuebar'

Vue.use(VueBar)

export default {
  name: 'app',
  components: {
  },
  mounted () {
    console.log('about to force scroll')
    this.$scrollTo('#element', 1000, { easing: 'ease' })
  }
}

And the html:

<h3 id="elementtop">HOLA</h3>

        <button v-scroll-to="'#element'">
            Scroll to #element
        </button>

        <br><br><br><br><br><br><br><br>test<br><br><br><br><br><br>test2<br><br><br><br>HOLA<br><br><br><br><br><br><br><br><br><br>test<br><br><br>test2<br><br><br><br><br><br>test<br><br><br>test2<br><br>HOLA<br><br><br><br><br>test<br><br><br>test2<br><br>HOLA BOSS<br><br><br><br><br>test<br><br><br>test2<br><br>HOLA BOSS<br><br><br><br><br>test<br><br><br>test2<br><br>HOLA BOSS<br><br><br><br><br>test<br><br><br>

<h3 id="element">test2</h3><br><br>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
rigor789commented, Jul 8, 2017

Hi, I have tried your example, and it works, except when you refresh with your keyboard, because it picks up as a cancel event, and immediately cancels the scrolling. I have pushed out a fix, so doing

this.$scrollTo('#element', 1000, { easing: 'ease', cancelable: false })

should work. (update to 2.7.1)

Here is a project that works: https://github.com/rigor789/vue-scrollto-demo-project

0reactions
LabuschagneBcommented, Jun 24, 2019

Please can we get this to work on IOS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No errors displayed in the "Error List" (error list doesn't show ...
Sometimes when I run "Build Solution" command and build fails my "Error List" window is empty. ... Edited. this issue is associated with...
Read more >
C program not running but getting compiled with no errors
BTW a program compile without error or warnings is by no means a guarantee that it runs as expected. – Jabberwocky. Nov 1,...
Read more >
getting no error message but program not working - General
Hi,. I'm trying to extend a colleague's code. But since I have no experience with R, it's difficult for me.
Read more >
No error, did not run - Power Platform Community - Microsoft
I'm trying to troubleshoot, but I can't tell if it's not producing "runs" because there's an error. I have no idea how to...
Read more >
Update cursor not working but with no errors
I am using ArcGIS Pro v. 3, arcpy with Python 3. Here is my code: fields = ["B1a_Score"] all_rows = [i[0] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found