I am learning vue
. I have the following method where I add a chat message to a div with id=\"toolbar-chat\"
. This div allows scrolling on y axis an
Here is my solution :
One global div in main container
One global function put in the Vue prototype :
Vue.prototype.$scrollTop = function () {
var element = document.getElementById("topDiv");
var top = element.offsetTop;
window.scrollTo(0, top);
}
The same anchor everywhere :
Go to the top