]> git.sesse.net Git - remoteglot/commitdiff
Fix highlight removals.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Dec 2022 23:20:13 +0000 (00:20 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Dec 2022 23:20:13 +0000 (00:20 +0100)
www/js/remoteglot.js

index f78078fe938048fab75e6089510bbeeab36f3342..624156b0f311dbc7b2d09e8b2d4ccbb616ae8929 100644 (file)
@@ -793,7 +793,7 @@ var print_pv = function(line_num, splicepos, opt_limit, opt_showlast) {
  * Based on the global "highlight_from" and "highlight_to" variables.
  */
 var update_board_highlight = function() {
-       document.getElementById("board").querySelector('.square-55d63').classList.remove('nonuglyhighlight');
+       document.getElementById("board").querySelectorAll('.square-55d63').forEach((square) => square.classList.remove('nonuglyhighlight'));
        if ((current_display_line === null || current_display_line_is_history) &&
            highlight_from !== undefined && highlight_to !== undefined) {
                document.getElementById("board").querySelector('.square-' + highlight_from).classList.add('nonuglyhighlight');