fix orphaned storage grid pieces getting stuck to the cursor #27960
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.
About the PR
Closes #27918
Sometimes, when you click, the drag begins but the storage pieces are immediately rebuilt, causing the one you are dragging to enter a state of zen as it casually deparents and can no longer be clicked on. This results in the OnKeyBindUp never getting called due to the control being in an invalid state so you can never end the dragging.
to fix this, we simply check when rebuilding the storage pieces to make sure that we aren't accidentally getting rid of the piece we are dragging. We just add it back into its spot and let the rest of the UI update as it needs to.
Media
Breaking changes
Changelog
🆑