Repository navigation
fix: Delete could remove the selection behind an open dialog - #337
Merged
Merged
Conversation
The Delete key from the multi-select change only checked the main menu. With the Share, Help, Save or Trophies dialog open, pressing Delete or Backspace removed the selected nodes behind it, where the player couldn't see them go, and refunded only half their cost. It now does nothing while any dialog is open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My own miss from #333, found in self-review. The Delete key only checked the main menu. With the Share, Help, Save or Trophies dialog open, pressing Delete or Backspace removed the selected nodes behind it, where the player couldn't see them go, and refunded only half their cost.
It now does nothing while any dialog is open: the check is any
*-modalwithout.hidden. All nine dialogs hide that way.Checked
The new tests failed before the fix, one per dialog, and pass after it.
In a real browser, with a real click and real key presses:
After starting a game and skipping the tutorial, no dialog reads as open, so the check doesn't block Delete in normal play.