Overview
If you start to place a component on the canvas and change your mind, there's no apparent way to abort or cancel, depending on minor circumstances. If you haven't hovered over a slot yet, you can effectively abort by dropping it on the primary menu on the left--though it won't give any indication that's what's going to happen. If you've already hovered over a slot, activating the blue placement indicator, that doesn't work.
Proposed resolution
Allowing the user to cancel adding a component after starting to place it. The following interactions should cancel the insert:
- Pressing Esc-key
- Dropping within the admin. UI (i.e. sidebars or the top bar)
User interface changes
Perhaps adding something akin to a drop zone. Or maybe just if you drop something on the empty canvas. A clear signifier on the cursor would be good, too. macOS Finder has a good example UI for removing favorite from the sidebar that might be equally valid for not placing things on the canvas:

| Comment | File | Size | Author |
|---|---|---|---|
| cancel-drag-and-drop.gif | 159.93 KB | traviscarden |
Issue fork experience_builder-3484944
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
traviscarden commentedComment #3
lauriiiThe component insert should be cancelled at least by pressing Esc-key or by dropping within the admin. UI (i.e. sidebars or the top bar). There might be other interactions but we could start with these.
Comment #4
el7cosmosHere are issues on sortable js library: https://github.com/SortableJS/Sortable/issues?q=esc+
Comment #6
sea2709 commented@traviscarden @lauriii : I would like to pick up this issue. I did some debugging and found out a way to prevent adding component by pressing Esc or dropping it in an invalid zone. When you have time, could you review my change?
Thanks!
Comment #8
lauriiiUX wise this seems like a nice improvement! I asked review from @jessebaker on the solution.
Comment #10
sea2709 commentedThanks @jessebaker for reviewing my work. I scanned through the source code of Sortable library, I saw the property "originalEvent" is assigned to event object by using the function Object.defineProperty(), and originalEvent is not an official property of SortableEvent. After googling a while, this is what I came up with
Comment #12
hooroomooComment #13
hooroomooComment #15
hooroomooThank you!! This is great