vue-scrollto icon indicating copy to clipboard operation
vue-scrollto copied to clipboard

Also add validator for element of scroll container

Open NicksonYap opened this issue 6 years ago • 0 comments
trafficstars

Hi,

Example case:


 VueScrollTo.scrollTo('#xxxelement', 2000, {
        container: '#xxxcontainer',
      });

it seems that there is a validator for the target element to scroll to, producing the warning:

[vue-scrollto warn]: Trying to scroll to an element that is not on the page: #xxxelement

However for the #xxxcontainer container, the error will just be:

TypeError: Cannot read property 'offsetTop' of null"

NicksonYap avatar Jul 18 '19 15:07 NicksonYap