google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.52k stars 3.72k forks source link

Workspace comments and comment drag strategy undo bug with multiselect plugin #8531

Closed changminbark closed 2 months ago

changminbark commented 3 months ago

Check for duplicates

Description

After multiselecting comments, copy/pasting them, and then undoing that action does not get rid of the comments from the multiselection. This is usually not a problem as it also happens to blocks. However, the blocks and comments have different isMovable (drag strategy) and isDeletable methods, which lead to a breaking behavior in the multiselect plugin. I have already tested a fix for this by implementing the missing isDeadOrDying() check for the isMovable and isDeletable methods for comments.

Reproduction steps

Stack trace

No response

Screenshots

No response

Browsers

No response

changminbark commented 3 months ago

I have made a PR to fix this issue.

cpcallen commented 3 months ago

Hi @changminbark. Thanks for the bug report and PR. Can you provide steps to reproduce this issue, please? It would be great if it included a minimal index.html that has all the required imports, but at minimum please include a link to a demo page and fill in the numbered reproduction steps in enough detail that we can try it out.