Fixed incorrect identify of the current block if a nested editor is used in it
Hello! I have noticed a problem that when using a nested editor in a block, the parent editor stops correctly identifying the current block when hovering over or clicking on the nested editor block.
Example:
You can see that the toolbox menu jumps when you hover or click on the nested editor. This happened because in hover/click events, all editors in the chain received the block of the lower-level editor in which the event occurred. So the top-level editors could not correctly determine in which block of their instance the event occurred.
I fixed this bug by making a function that determines the block belonging to a current editor instance when an event occurs for each editor in the nesting chain.
Example after fix:
- The example used the Spoiler block, but the problem was relevant for any case of using a nested editor