I am building a web app, and part of that web app needs to scroll to the top when an action is performed. This is handled using window.scrollTo(0,0)
which works perfectly until I add some CSS styling below (which I require for this project).
Has anybody got any idea why the CSS below would stop window.scrollTo(0,0)
working?
* {
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
P.S. I cannot use jQuery in my situation, just in case it's suggested that I do that.