diff --git a/server/scripts/index.mjs b/server/scripts/index.mjs index c4dc551..946e79a 100644 --- a/server/scripts/index.mjs +++ b/server/scripts/index.mjs @@ -26,7 +26,7 @@ const categories = [ 'Postal', 'Populated Place', ]; const category = categories.join(','); -const TXT_ADDRESS_SELECTOR = '#txtAddress'; +const TXT_ADDRESS_SELECTOR = '#txtLocation'; const TOGGLE_FULL_SCREEN_SELECTOR = '#ToggleFullScreen'; const BNT_GET_GPS_SELECTOR = '#btnGetGps'; diff --git a/server/scripts/modules/autocomplete.mjs b/server/scripts/modules/autocomplete.mjs index ce54453..8a23f96 100644 --- a/server/scripts/modules/autocomplete.mjs +++ b/server/scripts/modules/autocomplete.mjs @@ -296,7 +296,7 @@ class AutoComplete { // if a click is detected on the page, generally we hide the suggestions, unless the click was within the autocomplete elements checkOutsideClick(e) { - if (e.target.id === 'txtAddress') return; + if (e.target.id === 'txtLocation') return; if (e.target?.parentNode?.classList.contains(this.options.containerClass)) return; this.hideSuggestions(); } diff --git a/server/styles/scss/_page.scss b/server/styles/scss/_page.scss index 747b4bd..3f7ade2 100644 --- a/server/styles/scss/_page.scss +++ b/server/styles/scss/_page.scss @@ -94,17 +94,22 @@ body { font-family: "Star4000"; } - #txtAddress { + #txtLocation { width: calc(100% - 170px); max-width: 490px; font-size: 16pt; min-width: 200px; display: inline-block; + // Ensure consistent styling across light and dark modes + background-color: white; + color: black; + border: 2px inset #808080; + @media (prefers-color-scheme: dark) { background-color: #000000; color: white; - border: 1px solid darkgray; + border: 2px inset #808080; } } diff --git a/tests/index.mjs b/tests/index.mjs index e1d9ac4..198dc8e 100644 --- a/tests/index.mjs +++ b/tests/index.mjs @@ -21,7 +21,7 @@ page.on('console', messageFormatter); const tester = async (location, testPage) => { // Set the address - await testPage.type('#txtAddress', location); + await testPage.type('#txtLocation', location); await setTimeout(500); // get the page await testPage.click('#btnGetLatLng'); diff --git a/views/index.ejs b/views/index.ejs index 992c0e8..57b8cab 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -64,9 +64,8 @@ class="kiosk"<% } %>> -
- +