From d677b825e1cdad4725eb805ed2890c151012c4dd Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Fri, 21 Jul 2023 21:49:29 +0200 Subject: [PATCH] Disable spellcheck and autocomplete on all inputs --- frontend/src/lib/actions/input.js | 3 +++ .../organisms/connection/collection/dialogs/duplicate.svelte | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/actions/input.js b/frontend/src/lib/actions/input.js index 5cb119a..369dd17 100644 --- a/frontend/src/lib/actions/input.js +++ b/frontend/src/lib/actions/input.js @@ -10,6 +10,9 @@ export default function input(node, { autofocus, type, onValid, onInvalid, manda mandatory: false, }) { + node.setAttribute('spellcheck', false); + node.setAttribute('autocomplete', false); + const getMessage = () => { const checkInteger = () => (isInt(node.value) ? false : 'Value must be an integer'); const checkNumberBoundaries = boundaries => { diff --git a/frontend/src/organisms/connection/collection/dialogs/duplicate.svelte b/frontend/src/organisms/connection/collection/dialogs/duplicate.svelte index 9b10b0a..21e84fb 100644 --- a/frontend/src/organisms/connection/collection/dialogs/duplicate.svelte +++ b/frontend/src/organisms/connection/collection/dialogs/duplicate.svelte @@ -3,7 +3,7 @@ import Modal from '$components/modal.svelte'; import input from '$lib/actions/input'; import hostTree from '$lib/stores/hosttree'; - import { createEventDispatcher } from 'svelte'; + import { createEventDispatcher, onMount } from 'svelte'; export let host = {}; export let dbKey = ''; @@ -55,7 +55,7 @@