Skip to content

Different behaviour of arrows with the same preset: before and after the mouse leaves the board #20446

@lluisalemanypuig

Description

@lluisalemanypuig

Exact URL of where the bug happened

I've documented the bug in https://lichess.org/analysis but it also works in puzzles and games. I suspect it also happens in everything that involves the same component used for the board in "/analysis"

I've tried this on

  • Firefox: Version 150.0.2
  • Chromium: Version 147.0.7727.116

Steps to reproduce the bug

The bug is easy to reproduce (I showcase this here: https://youtu.be/th-BdRyn7Dw):

  1. Set your settings so that arrows can be drawn only "valid moves".
    Important Note The valid moves option has nothing to do with actual valid moves: it is only intended to snap on squares diagonally, horizontally, vertically, or in a knight move. For the sake of brevity, I'll call these squares DHVK.
  2. Go to analysis (or open an actual game)
  3. Try to draw a line to a square where the arrow does not snap -- you shouldn't be able to as per the settings applied in step 1
  4. Now, hold down the appropriate mouse button for drawing arrows, and move the cursor out of the board area; do not stop holding the button.
  5. Move the cursor back to the board area: the arrows you can draw snap to all squares you move the cursor to.

What did you expect to happen?

The arrows not snapping to DHVK squares. If the arrows only snap to DHVK squares (as per the settings), the arrows should still only snap to DHVK even after the cursor has left the board and re-entered.

What happened instead?

After the cursor leaves the board, the arrows snap to all squares: only DHVK squares should be allowed.

Operating system

Ubuntu 24.04

Browser and version (or alternate access method)

Firefox 150.0.2

Additional information

I've tried this on both

  • Firefox: Version 150.0.2
  • Chromium: Version 147.0.7727.116

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions