Skip to content

Commit

Permalink
fix: wrong selection index
Browse files Browse the repository at this point in the history
  • Loading branch information
Attacktive committed Dec 5, 2023
1 parent 14e6a9e commit 3c16c21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function drawInputButtons() {

input.setRangeText(target.innerText, start, end);

const newSelection = end + target.innerText.length;
input.selectionStart = newSelection;
input.selectionEnd = newSelection;
const newSelectionStart = end + target.innerText.length + 1;
input.selectionStart = newSelectionStart;
input.selectionEnd = newSelectionStart;
};

const consonantInputButtonArea = document.querySelector("#input-button-area-consonants") as HTMLDivElement;
Expand Down

0 comments on commit 3c16c21

Please sign in to comment.