Skip to content

Commit

Permalink
fix: focus to the <input> element whenever pasted
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Jul 1, 2024
1 parent db0aa78 commit 8bf3caa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
await pushBlock(textBefore + text + textAfter);
if (distanceToEnd)
inputRef.setSelectionRange(input.length - distanceToEnd, input.length - distanceToEnd);
setCusorToEnd();
};
const onKeyDown: KeyboardEventHandler<Document> = (event) => {
Expand Down

0 comments on commit 8bf3caa

Please sign in to comment.