From f22e1c576b456676a8e7abf20f1e0f945eb1ba01 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 6 Oct 2020 18:32:10 +0200 Subject: [PATCH] Scroll up on page change --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 24eac68..b48f62c 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,7 @@ if (app.ports !== undefined && app.ports.registerVideo !== undefined) { app.ports.registerVideo.subscribe(function(args) { + window.scrollTo(0, 0); var time = parseInt(args[2], 10) || undefined; requestAnimationFrame(function() { @@ -41,6 +42,7 @@ if (app.ports !== undefined && app.ports.eraseVideo !== undefined) { app.ports.eraseVideo.subscribe(function() { + window.scrollTo(0, 0); lastId = undefined; }); }