Clariity / react-chessboard

The React Chessboard Library used at ChessOpenings.co.uk. Inspired and adapted from the unmaintained Chessboard.jsx.
https://react-chessboard.vercel.app
MIT License
348 stars 105 forks source link

Premove back to existing premove square causes piece to disappear #118

Closed jamestickle closed 9 months ago

jamestickle commented 10 months ago

Please see image. I couldn't see a reference to this in existing issues or in closed issues.

disappearedPieceOnPremove

jamestickle commented 10 months ago

Make a premove with any piece (not pawn), then make another premove back to original square. The same thing will occur if premoving to any square that has already been premoved to/from.

Clariity commented 10 months ago

Thank you, I can see this is an issue, currently extremely busy with other projects so won't get much time to look at this. If you have time please have a look and raise a PR, if not then I will have to address this at some point next year

jamestickle commented 10 months ago

Sure. Any clues on where to start looking?

Clariity commented 10 months ago

https://github.com/Clariity/react-chessboard/blob/main/src/chessboard/components/Piece.tsx#L86

Somewhere in this logic I think

Clariity commented 9 months ago

Fixed in #120, will be in next release