From 931b0806f96e3d92a89616bc3d6d488c02c42a1d Mon Sep 17 00:00:00 2001 From: Marvin Sextro Date: Wed, 29 Dec 2021 01:11:13 +0100 Subject: [PATCH] Scroll down after successful pass creation --- components/Form.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/Form.tsx b/components/Form.tsx index b0bfc65..7cb9937 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -191,6 +191,9 @@ function Form(): JSX.Element { const passBlob = new Blob([pass], {type: "application/vnd.apple.pkpass"}); saveAs(passBlob, 'covid.pkpass'); setLoading(false); + + var scrollingElement = (document.scrollingElement || document.body); + scrollingElement.scrollTop = scrollingElement.scrollHeight; } catch (e) { setErrorMessage(e.message); setLoading(false);