1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 21:17:59 +00:00

Disable spellcheck and autocomplete on all inputs

This commit is contained in:
Romein van Buren 2023-07-21 21:49:29 +02:00
parent 3ca561b4b4
commit d677b825e1
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
2 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,9 @@ export default function input(node, { autofocus, type, onValid, onInvalid, manda
mandatory: false, mandatory: false,
}) { }) {
node.setAttribute('spellcheck', false);
node.setAttribute('autocomplete', false);
const getMessage = () => { const getMessage = () => {
const checkInteger = () => (isInt(node.value) ? false : 'Value must be an integer'); const checkInteger = () => (isInt(node.value) ? false : 'Value must be an integer');
const checkNumberBoundaries = boundaries => { const checkNumberBoundaries = boundaries => {

View File

@ -3,7 +3,7 @@
import Modal from '$components/modal.svelte'; import Modal from '$components/modal.svelte';
import input from '$lib/actions/input'; import input from '$lib/actions/input';
import hostTree from '$lib/stores/hosttree'; import hostTree from '$lib/stores/hosttree';
import { createEventDispatcher } from 'svelte'; import { createEventDispatcher, onMount } from 'svelte';
export let host = {}; export let host = {};
export let dbKey = ''; export let dbKey = '';
@ -55,7 +55,7 @@
</label> </label>
<label class="field"> <label class="field">
<span class="label">Collection</span> <span class="label">Collection</span>
<input type="text" bind:value={newColl} use:input /> <input type="text" bind:value={newColl} use:input={{ autofocus: true }} />
</label> </label>
</div> </div>
</div> </div>