Scroll to top of page before locking

This commit is contained in:
Zakary Timson 2019-03-24 11:17:52 -04:00
parent 58e853e7b7
commit 0df5fe8e6d

View File

@ -19,6 +19,7 @@ export class AppComponent implements OnInit {
cart: { id: string; item: string; option: POption, quantity: number}[];
set lock(lock: boolean) {
if(lock) window.scrollTo(0, 0);
document.getElementsByTagName('body')[0].classList[lock ? 'add' : 'remove']('lock');
}