From 8e881ae4014c89e146c0b58f6c268c9e9a4b586c Mon Sep 17 00:00:00 2001 From: bakk Date: Thu, 27 May 2021 20:58:07 +0200 Subject: [PATCH] kalk_web: Focus input field on button press --- kalk_web/package.json | 2 +- kalk_web/src/KalkCalculator.svelte | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kalk_web/package.json b/kalk_web/package.json index f2ff39a..0955c06 100644 --- a/kalk_web/package.json +++ b/kalk_web/package.json @@ -1,6 +1,6 @@ { "name": "@paddim8/kalk-component", - "version": "1.1.1", + "version": "1.1.2", "description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.", "svelte": "src/main.ts", "main": "public/build/bundle.js", diff --git a/kalk_web/src/KalkCalculator.svelte b/kalk_web/src/KalkCalculator.svelte index f246be9..0b3b236 100644 --- a/kalk_web/src/KalkCalculator.svelte +++ b/kalk_web/src/KalkCalculator.svelte @@ -164,6 +164,7 @@ } function insertText(input: string) { + inputElement.focus(); let cursorPos = getCursorPos(inputElement); const textContent = inputElement.textContent; let movementOffset = input.length;