From 8f412bdd0f984d28e4a949fcf6b836c229aac9b3 Mon Sep 17 00:00:00 2001 From: adrien Date: Thu, 30 Mar 2023 03:42:32 +0200 Subject: [PATCH] keyboard button --- css/style.css | 4 ---- js/sudoku.js | 9 ++------- sudoku.php | 4 ++++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/css/style.css b/css/style.css index 190d477..8535c0a 100644 --- a/css/style.css +++ b/css/style.css @@ -125,10 +125,6 @@ table input:enabled { z-index: 1000; } -.bi::before { - vertical-align: 0; -} - .pencil { color: var(--bs-secondary-color) !important; } diff --git a/js/sudoku.js b/js/sudoku.js index 4c957a5..d592fe6 100755 --- a/js/sudoku.js +++ b/js/sudoku.js @@ -67,7 +67,7 @@ window.onload = function() { searchCandidatesOf(box) }) - insertRadios = Array.from(insertRadioGroup.getElementsByTagName("input")) + insertRadios = Array.from(insertRadioGroup.getElementsByTagName("input")).slice(1) for (label of document.getElementsByTagName("label")) { label.control.label = label @@ -300,12 +300,7 @@ function onmouseleave(event) { } function insert(radio) { - if (radio.value == valueToInsert) { - valueToInsert = "" - radio.checked = false - } else { - valueToInsert = radio.value - } + valueToInsert = radio.value grid.style.cursor = valueToInsert ? "copy" : "text" highlight() } diff --git a/sudoku.php b/sudoku.php index 4d04b29..8d62550 100755 --- a/sudoku.php +++ b/sudoku.php @@ -78,6 +78,10 @@
+ + \n";