]> git.ardis.lu - event-hashes/commitdiff
Fix bug where clear-code button does not disappear after input is manually cleared
authorArdis Lu <ardisglu@gmail.com>
Fri, 6 Jun 2025 03:42:29 +0000 (20:42 -0700)
committerArdis Lu <ardisglu@gmail.com>
Fri, 6 Jun 2025 03:42:29 +0000 (20:42 -0700)
The early return was preventing the state from being reset.

index.html

index fae6ad48dfd34e10253dd1807a0228d50d602b44..bd792bbe956da4d6c3e2506501c0408891b25441 100644 (file)
 
       // Input has been cleared, reset back to default state
       if (textarea.value === '') {
+        document.querySelector('#clear-code').style.display = 'none';
         return;
       }
 
This page took 0.041612 seconds and 4 git commands to generate.