From 86002e9edbf337b299c4a0a4d444f29f05e6eaa2 Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Fri, 29 Jul 2022 09:55:20 +1200 Subject: [PATCH] Prevent form submission in Pagefind UI --- pagefind_ui/svelte/ui.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pagefind_ui/svelte/ui.svelte b/pagefind_ui/svelte/ui.svelte index 289f33c5..88ad8db0 100644 --- a/pagefind_ui/svelte/ui.svelte +++ b/pagefind_ui/svelte/ui.svelte @@ -81,7 +81,8 @@ } }; - const showMore = () => { + const showMore = (e) => { + e?.preventDefault(); show += 5; }; @@ -92,6 +93,7 @@ role="search" aria-label="Search this site" action="javascript:void(0);" + on:submit={(e) => e.preventDefault()} > {#if searchResult.results.length > show}