From e8d85d98772ce65974c68c3f7f33f0cdfb2dd27e Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Sun, 23 Jun 2024 22:57:06 +0200 Subject: [PATCH] lfix bug back button not working on mobile --- snippets/shx-loading-screen.liquid | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snippets/shx-loading-screen.liquid b/snippets/shx-loading-screen.liquid index 8ef8d5e..7d2573d 100644 --- a/snippets/shx-loading-screen.liquid +++ b/snippets/shx-loading-screen.liquid @@ -80,6 +80,11 @@ window.addEventListener("load", function() { hideLoadingScreen(); }); + + // This event is triggered when the page is displayed, including back navigation + window.addEventListener("pageshow", function(event) { + hideLoadingScreen(); + }); }); {% endif %}