Skip to content

Fix deselection when grabbing multiselected block's shadow input#141

Open
LappiLappland wants to merge 2 commits into
mit-cml:mainfrom
LappiLappland:fix/shadow-block-grab
Open

Fix deselection when grabbing multiselected block's shadow input#141
LappiLappland wants to merge 2 commits into
mit-cml:mainfrom
LappiLappland:fix/shadow-block-grab

Conversation

@LappiLappland
Copy link
Copy Markdown

The basics

The details

Resolves

Fixes #119. Problem with shadow blocks

Proposed Changes

Iterate over block's parent chain until we find non-shadow block. Shadow blocks cannot be grabbed, so they do no deselect item

Reason for Changes

N/A

Test Coverage

added clicking unselected block clears selection and selects it test that covers this specific scenario. Without this fix test fails

Documentation

N/A

Additional Information

N/A

@mjgallag
Copy link
Copy Markdown
Contributor

@LappiLappland would you mind adding a test the confirms shadow block behavior with single select as that makes it easier to reason about what multiselect should do? Thanks for this! FYI, I will be on vacation for a week starting Thu and then at Blockly summit so will be delayed reviewing and merging your pulls but I am definitely interested in getting all these bug fixes in.

@mjgallag mjgallag self-requested a review May 19, 2026 17:25
@LappiLappland
Copy link
Copy Markdown
Author

@mjgallag I have added new test for single selection. Blockly actually keeps logical selection on shadow block, but visually shows parent as highlighted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the pointerdown event listener issue related to Drag to Select

2 participants