Blocks: Fix clearing selection on canvas click#1079
Conversation
|
I've noticed that this breaks multi-selection. Looking |
|
It's better now, I've updated the dismiss event. It's bound to |
|
Instead of capturing the click, can we style it so that it's not occupying the full width of the canvas, letting clicks be captured by the max-width: $visual-editor-max-width;
margin: 0 auto; |
|
Yep, the new full width method requires there to be no max width on the blocks. We've been through a few techniques and this was the one that had the fewest tradeoffs. User experience wise, this works well! Mousedown would be better, but absent that this works well! 👍 |
Why is this necessary? Feels like we're letting desired behavior of this component be dictated by its descendants. |
|
Maybe we revert to the behavior where |
It's necessary because when we click the mouse on a node and release it on a different one, The event target is the first common ancestor I think. This causes the multi-selection to clear itself on release. I'm updating to use |
1925c43 to
7606822
Compare
|
I'm merging this since it's the best solution we have right now. |
|
Perhaps going back to |
#812 added a padding around the BlockList container, so in order to dismiss the selection properly, we need to catch clicks on this container.