Unnecessary events when interacting with functions
Check for duplicates
- [x] I have searched for similar issues before opening a new one.
Component
block-shareable-procedures
Description
Hi, I found a strange behavior when using the library. If you add this configuration (1 screenshot), then when you try to update the procedure name, add, delete or rename a parameter, unnecessary move events occur. The most interesting thing is that it works exactly starting from two or more inserted blocks in the call parameters. No such behavior was detected on the blockly core without a connected library.
I noticed that this is caused by triggerProceduresUpdate, but I couldn't find the reasons for the occurrence of unnecessary events. In addition, if you add more callable procedures besides the first one, then the move is called even on an unused procedure. (2 screenshot)
I consider this an important problem, since with a large number of such blocks, a lot of resources are spent on unnecessary operations. I would like to know which way to look in order to solve this problem.
Reproduction steps
- Add event logging
- Create the block structure as shown in the screenshot
- Change the name of the procedure
Stack trace
Screenshots
Events are triggered on all blocks, since it is not taken into account that it is worth updating only the blocks for declaring and calling the edited procedure in triggerProceduresUpdate.