From: Steinar H. Gunderson Date: Mon, 6 Jul 2020 14:14:30 +0000 (+0200) Subject: Fix some flickering. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=d5e6fc31302614c7744077f10d49ed0347921a40;p=pr0n Fix some flickering. --- diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index a8ad78a..14b080d 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -133,7 +133,8 @@ function display_image(url, backend_width, backend_height, elem_id, offset, prel // Seemingly one needs to delay position_image(), or Firefox will set the initial // scroll offset completely off. - setTimeout(function() { position_image(img, backend_width, backend_height, offset, preload); }, 1); + img.style.display = 'none'; + setTimeout(function() { position_image(img, backend_width, backend_height, offset, preload); img.style.display = null; }, 1); } }