blockbook icon indicating copy to clipboard operation
blockbook copied to clipboard

Handle focusing outside the editor to unselect block

Open johnstonphilip opened this issue 4 years ago • 0 comments

When you click on a block, there's no way to unselect it. So even if your focus moves to another part of the page, or you click outside the block that is currently selected, it remains selected.

You can see this in action by following these steps:

  1. Go here: https://youknowriad.github.io/blockbook/block/core---audio/editor
  2. Click on the block to select it, notice its toolbar pops up
  3. Click outside the block somewhere.
  4. Notice the block does not become unselected.

Sidenote: I am not totally sure if this is something to solve here in BlockBook, or if its a Gutenberg-specific issue. But since the actual Editor in Gutenberg/WordPress does unselect blocks when you click outside them, it would seem this might be an implementation detail of the project using the core-editor package.

johnstonphilip avatar Aug 10 '20 13:08 johnstonphilip