What happens/fires when you select a block in the editor?
I’m writing a plugin for a new block type. It has some backend processing, and uses ServerSideRender
. When I render on the admin / post-edit side of things, I put the render inside a Disabled
block, and, indeed, mouse-hover doesn’t do anything, and the javascript controls inside the block seem to be disabled. But the whole thing is wrapped in a div
with class wp-block
. When you click on that wrapper div
… something happens. Whatever that something is, the children seem to get re-rendered, and my stuff is not working properly. I’m trying to understand what gets fired when that wrapper div
changes to is-selected
, and what it’s supposed to do; so I can figure out what, if anything, I should handle when that happens.
Leave an answer