Skip to content

Commit

Permalink
Fix to select text(numbers) when clicking input
Browse files Browse the repository at this point in the history
  • Loading branch information
lamrongol committed Sep 11, 2024
1 parent d81c221 commit 68026ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ window.onload = () => {
})
//auto_select
document.querySelectorAll('input[type="number"]').forEach(input => {
input.addEventListener("click", (evt) => {
evt.target.select();
});
input.addEventListener("input", auto_select_evt);
});
//auto_calculate
Expand Down

0 comments on commit 68026ac

Please sign in to comment.