Automatically adjust dialog position when the virtual keyboard is displayed, and allow input from the virtual keyboard to update value bindings in Svelte textfields.

This commit is contained in:
David Carley
2022-08-18 08:01:00 +00:00
parent 2554f0ea75
commit 1bd096e55c
8 changed files with 81 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
import TextField from "@smui/textfield";
import Button, { Label } from "@smui/button";
import { ControllerMethods } from "$lib/RegisterControllerMethods";
import { virtualKeyboardChangeHelper } from "$lib/customActions";
export let open: boolean;
export let axis = "";
@@ -42,6 +43,7 @@
label="Position"
type="number"
bind:value
use={[[virtualKeyboardChangeHelper, (newValue) => (value = newValue)]]}
spellcheck="false"
variant="filled"
style="width: 100%;"