Skip to content

Conversation

@kaiju-no-9
Copy link

The pie menu's "Delete" button was calling an extra function, that.blocks.extract(), before calling that.blocks.sendStackToTrash().
Screenshot 2025-11-17 at 4 24 33 AM

The extract() function (which is meant to pull a block from the middle of a stack) was breaking the widget's internal state before it was even sent to the trash. The drag-and-drop delete function only calls sendStackToTrash(), which is why it worked correctly.

The pie menu's "Delete" button was calling an extra function, that.blocks.extract(), before calling that.blocks.sendStackToTrash().

The extract() function (which is meant to pull a block from the middle of a stack) was breaking the widget's internal state before it was even sent to the trash. The drag-and-drop delete function only calls sendStackToTrash(), which is why it worked correctly.
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@kaiju-no-9 kaiju-no-9 changed the title fix fix Widget block gets disable after Restore #4670 Nov 16, 2025
@Commanderk3
Copy link
Member

@kaiju-no-9 I have tested. Seems to be working fine 👍

@suryaanshah
Copy link
Contributor

@Commanderk3 Removing the extract function does appear to fix the widget block issue (as noted in the original issue thread), but it was originally added for a reason. We should understand the implications before removing it outright.

@kaiju-no-9
Copy link
Author

@suryaanshah yes one should look for it if i does cause any issue but this was the only place cause the bug i went through all the code__base and rest all is working fine

@walterbender
Copy link
Member

Yes, but.

The extract is important when you are sending a block that is in a stack to the trash. To load the default project and then try sending the top note block to the trash. W/o your change, just the note block is sent to the trash. With your change, all of the note blocks are sent to the trash.

@kaiju-no-9
Copy link
Author

I understood, will look forward to finding a better solution

@walterbender
Copy link
Member

Here is my latest theory: the extract process is not pulling the "hidden" block at the end of the stack. (All clamp blocks have a hidden block attached... if it is not there, the clamp block will not execute.)

@walterbender
Copy link
Member

@kaiju-no-9 were you able to test my hypothesis?

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.

4 participants