]> git.cworth.org Git - lmno.games/commit
letterrip: Fix blank-letter to work even if letter selection is cancelled
authorCarl Worth <cworth@cworth.org>
Sat, 7 Mar 2026 23:05:55 +0000 (18:05 -0500)
committerCarl Worth <cworth@cworth.org>
Sat, 7 Mar 2026 23:05:55 +0000 (18:05 -0500)
commit7962bc994a9463ee7a2e75bb9507bdd5a94f8729
tree2c0e710db455b916965a5a6306bb9067e95f0ce0
parent6cba55b27e273ed69576a61dfadbd0cd5d0505ed
letterrip: Fix blank-letter to work even if letter selection is cancelled

If a user is moving a blank tile off of their rack onto the board,
then they are required to choose a letter for the blank. In this
situation, cancelling letter selection cause the blank tile to be
returned to the rack.

In contrast, when moving a blank tile from one space on the board to
the other, the blank will already have a selected letter, and it's
reasonable for that selection to be unchanged. So in this case,
cancelling the letter selection should let the movement work, and
should not send the letter back to the rack.

This commit fixes that scenario by performing the movement prior to
bringing up the selection modal. That way, if the selection modal is
cancelled, there's nothing else to do and the user gets the desired
behavior (the tile moved, unchanged).
letterrip/letterrip.jsx