From 4b135dfddabc705b23d0e4b616e5d07cc5c0ba03 Mon Sep 17 00:00:00 2001 From: NightScript <18664762+NightScript370@users.noreply.github.com> Date: Wed, 25 Dec 2024 17:34:36 -0500 Subject: [PATCH] Disable autocomplete Hopefully that fixes the datalist --- assets/js/location.js | 5 +++-- pages/index.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/js/location.js b/assets/js/location.js index 8da56a1..d584e92 100644 --- a/assets/js/location.js +++ b/assets/js/location.js @@ -130,7 +130,8 @@ async function updateList(event) { .split(" ") .map(word => word[0] ? (word[0].toUpperCase() + word.substring(1).toLowerCase()) : word) .join(" "); - elements.searchBar.value = q; + if (elements.searchBar.value !== q) + elements.searchBar.value = q; if (q.length < 3) { if ((event instanceof KeyboardEvent && event.key == "Enter") || event instanceof MouseEvent) { @@ -186,7 +187,7 @@ async function updateList(event) { if (!((event instanceof KeyboardEvent && event.key == "Enter") || event instanceof MouseEvent)) { pool = q; - await delay(1000); + await delay(500); if (pool !== q) { console.log('Skipping to next implementation'); return; diff --git a/pages/index.html b/pages/index.html index 20444e1..15e1871 100644 --- a/pages/index.html +++ b/pages/index.html @@ -79,7 +79,7 @@