From: Steinar H. Gunderson Date: Fri, 23 Dec 2022 23:20:13 +0000 (+0100) Subject: Fix highlight removals. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=339341539aba0ccb2520cd46a91bdd5b8c9344bf Fix highlight removals. --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index f78078f..624156b 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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');