Skip to content

Fix the over the board clock switching before promotion piece is selected#2888

Merged
veloce merged 1 commit into
lichess-org:mainfrom
glitchfl:fix-over-the-board-clock-promotion-timing
Apr 3, 2026
Merged

Fix the over the board clock switching before promotion piece is selected#2888
veloce merged 1 commit into
lichess-org:mainfrom
glitchfl:fix-over-the-board-clock-promotion-timing

Conversation

@glitchfl

@glitchfl glitchfl commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

When a pawn reaches the last rank the clock was immediately switching to the opponent before the player chose a promotion piece. Now the clock only switches after the promotion selection is confirmed.

The onMove callback fires as soon as the pawn lands on the last rank before the promotion dialog even shows up just moved the clock switch behind a condition of if the move is a promotion skip switching in onMove and do it in onPromotionSelection instead

Fixes #2819 - "bug in "over the board" mode"

@veloce veloce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@veloce veloce merged commit 6a948ff into lichess-org:main Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug in "over the board" mode

2 participants