When an arrow is drawn, by default it should snap to a valid move. However after the mouse leaves the board DOM and then re-enters, the arrow stops snapping to a valid move. This is caused by the following code in the processDraw function of draw.ts.
if (!keyAtDomPos) {
cur.snapToValidMove = false;
}
I think originally this was meant to completely prevent the arrow from being drawn when mouse leaves the DOM, but the state of cur.snapToValidMove does not get set to the original value after the mouse re-enters the DOM. If this behavior is not intentional, I suggest the following fix:
When an arrow is drawn, by default it should snap to a valid move. However after the mouse leaves the board DOM and then re-enters, the arrow stops snapping to a valid move. This is caused by the following code in the
processDraw
function ofdraw.ts
.I think originally this was meant to completely prevent the arrow from being drawn when mouse leaves the DOM, but the state of
cur.snapToValidMove
does not get set to the original value after the mouse re-enters the DOM. If this behavior is not intentional, I suggest the following fix:If this is confirmed to be a bug, I'll be happy to create a pull request.