#Scrollto
20 messages · Page 1 of 1 (latest)
How about just window.scrollTo(0, 0);?
yep, first thing I did and it does not react to it.:/
I'm using that in quite a few different places
could you send me use case pls?
I just placed it same way to my watcher
and even it goes through, finally no window movement.
well could be tons of factors depending on your your html and css is setup I guess
so hard to tell for me
maybe this https://github.com/vuejs/router/issues/1189 can give you some guidance
could also try playing with setTimeout/nextTick
thanks for advice. I just found out, the window.scrollTo works for scroll of full page, I am scrolling in nested divider and there its not working:/
yep wont work for nested things
can try grabbing the ref of the container then and scrolling to that I guess
I'd rather use template refs instead of accessing the document itself but if it works 👍
also maybe do the process.client check in the scroll function instead of in the watch to avoid repeating the check
you are absolutely right, thx🚀