From a22edeb9b12b364fd447ba5b5eaf4125755ebd14 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 23 Mar 2016 20:25:26 +0100 Subject: [PATCH] Fix a bug where an invisible PV could be selected when making a move on the board. --- www/js/remoteglot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 26abd4a..44f6c79 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1973,6 +1973,10 @@ var onSnapEnd = function(source, target) { // this move, then select that. Note that this gives us a good priority // order (history first, then PV, then multi-PV lines). for (var i = 0; i < display_lines.length; ++i) { + if (i == 1 && current_display_line) { + // Do not choose PV if not on it. + continue; + } var line = display_lines[i]; if (line.pv[line.start_display_move_num] === move.san) { show_line(i, 0); -- 2.39.2