kalk_web: Focus input field on button press

This commit is contained in:
bakk 2021-05-27 20:58:07 +02:00
parent 78e93a5f96
commit 8e881ae401
2 changed files with 2 additions and 1 deletions

View File

@ -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",

View File

@ -164,6 +164,7 @@
}
function insertText(input: string) {
inputElement.focus();
let cursorPos = getCursorPos(inputElement);
const textContent = inputElement.textContent;
let movementOffset = input.length;