From 68026ac0037cc85455d7e6020621ba551434f4df Mon Sep 17 00:00:00 2001 From: Lamron Date: Wed, 11 Sep 2024 16:08:24 +0900 Subject: [PATCH] Fix to select text(numbers) when clicking input --- script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script.js b/script.js index 260835b..2474a59 100644 --- a/script.js +++ b/script.js @@ -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