I’m having a strange problem, I’m developing a Brazilian electronic ballot box for my portfolio (you can see the model as a reference on Google) and I’m having an unusual error, the user enters numbers corresponding to the candidate, if the number is valid, the candidate appears if it is not valid, “voto nulo” appears and when you click on the white button it appears “voto branco”… when the user presses the orange button it erases the numbers and returns to the initial state with no numbers in the inputs… the problem That’s it, when I click on the orange button and fill in the inputs with the five values again, it no longer evaluates whether the vote is valid or not, and it also “blocks” the white button and doesn’t even return an error in the browser console (I deployed it to codepen because my code snippets exceed the 30000 character limit, and because it is also easier to debug)
https://codepen.io/Paulo1706/full/eYaargQ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Urna Eletrônica</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png">
<link rel="apple-touch-icon" sizes="57x57" href="./favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./favicons/apple-touch-icon-76x76.png">
<link rel="icon" type="image/png" sizes="96x96" href="./favicons/apple-touch-icon-96x96.png">
<link rel="apple-touch-icon" sizes="114x114" href="./favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="./favicons/android-icon-192x192.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div class="urna">
<div class="tela-urna">
<div class="digitos-tela pisca"></div>
<div class="digitos-tela"></div>
<div class="digitos-tela"></div>
<div class="digitos-tela"></div>
<div class="digitos-tela"></div>
<div class="voto-branco pisca">
<p class="voto-branco-texto">VOTO BRANCO</p>
</div>
<div class="voto-nulo pisca">
<p class="voto-nulo-texto">VOTO NULO</p>
</div>
<div class="candidato-info">
<div class="campo-foto">
<img class="foto">
</div>
<div class="nome-partido">
<p class="nome"></p>
<p class="partido"></p>
</div>
</div>
</div>
<div class="digitos-urna">
<div class="numeros">1</div>
<div class="numeros">2</div>
<div class="numeros">3</div>
<div class="numeros">4</div>
<div class="numeros">5</div>
<div class="numeros">6</div>
<div class="numeros">7</div>
<div class="numeros">8</div>
<div class="numeros">9</div>
<div class="zero numeros">
<div>0</div>
</div>
<div class="botoes-especiais">
<div class="branco">Branco</div>
<div class="corrige">Corrige</div>
<div class="confirma">Confirma</div>
</div>
</div>
</div>
<div class="quem-sou">Planejado com ???? e executado com <span class="coracao">❤️</span> por
<a href="https://beacons.ai/Tarsoo_Paulo" target="_blank" class="link">
Paulo de Tarso</a>
</div>
<script src="index.js"></script>
</body>
</html>