From 0138df933eea6020f6e7fe02b224ae51490d3c92 Mon Sep 17 00:00:00 2001 From: Ajurna Date: Fri, 9 Apr 2021 14:12:04 +0100 Subject: [PATCH] add timeout to scroll to make it more consistant. --- comic/templates/comic/read_comic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comic/templates/comic/read_comic.html b/comic/templates/comic/read_comic.html index 615d5b6..b035d43 100644 --- a/comic/templates/comic/read_comic.html +++ b/comic/templates/comic/read_comic.html @@ -47,7 +47,7 @@ }); Reveal.on( 'slidechanged', event => { - document.getElementsByClassName('slides')[0].scrollIntoView({behavior: 'smooth'}) + setTimeout(() =>{document.getElementsByClassName('slides')[0].scrollIntoView({behavior: 'smooth'})}, 100) $.ajax({url: "/comic/set_page/{{nav.cur_path}}/" + event.indexh + "/"}) });