mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-03-02 23:31:15 +01:00
kalk_web: Focus input field on button press
This commit is contained in:
parent
78e93a5f96
commit
8e881ae401
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@paddim8/kalk-component",
|
"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.",
|
"description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.",
|
||||||
"svelte": "src/main.ts",
|
"svelte": "src/main.ts",
|
||||||
"main": "public/build/bundle.js",
|
"main": "public/build/bundle.js",
|
||||||
|
@ -164,6 +164,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function insertText(input: string) {
|
function insertText(input: string) {
|
||||||
|
inputElement.focus();
|
||||||
let cursorPos = getCursorPos(inputElement);
|
let cursorPos = getCursorPos(inputElement);
|
||||||
const textContent = inputElement.textContent;
|
const textContent = inputElement.textContent;
|
||||||
let movementOffset = input.length;
|
let movementOffset = input.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user