Skip to content

fix: disposing during dragging#6954

Merged
BeksOmega merged 1 commit intoRaspberryPiFoundation:developfrom
BeksOmega:fix/disposing-during-dragging
Apr 6, 2023
Merged

fix: disposing during dragging#6954
BeksOmega merged 1 commit intoRaspberryPiFoundation:developfrom
BeksOmega:fix/disposing-during-dragging

Conversation

@BeksOmega
Copy link
Copy Markdown
Contributor

@BeksOmega BeksOmega commented Apr 5, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #6945

Proposed Changes

Makes it so that block move events are not fired if a block was disposed during a drag.

Reason for Changes

Because of how disposing was rearranged during #6894 the block got removed from the workspace's list of blocks before the gesture was canceled. This meant that when the move event tried to find the block, it couldn't.

Test Coverage

Manual testing.

Documentation

N/A

Additional Information

  1. I don't /think/ there are any other cases where this should be a problem. But if something like this comes up again we should look at rearranging the dispose order again.

  2. Did not look into why this was not causing problems for drag targets (e.g. the trashcan) ¯\_(ツ)_/¯

  3. This should probably go into tomorrow's patch as well.

@BeksOmega BeksOmega requested a review from a team as a code owner April 5, 2023 23:49
@BeksOmega BeksOmega requested a review from maribethb April 5, 2023 23:49
@github-actions github-actions Bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Apr 5, 2023
@BeksOmega BeksOmega merged commit 2167afa into RaspberryPiFoundation:develop Apr 6, 2023
BeksOmega added a commit to BeksOmega/blockly that referenced this pull request Apr 6, 2023
@BeksOmega BeksOmega mentioned this pull request Apr 6, 2023
4 tasks
@BeksOmega BeksOmega deleted the fix/disposing-during-dragging branch April 18, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

2 participants