Dropping a device under the floating #canvas-toolbar creates a device with no clickable point at all #33
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The floating
#canvas-toolbarsits on top of the canvas and silently swallows any device dropped underneath it. The device is created and exists on the server, but it has no clickable point at all — it cannot be selected, dragged, renamed, cabled, or deleted with the mouse.Reproduction
Evidence
The device group is present and valid in the DOM, and is even programmatically selectable:
But hit-testing every pixel of its body returns the toolbar:
A full scan of the device body for a point where
elementFromPoint(...).closest('[data-device-id]')resolves to the device returns null — there is no such point.
document.elementFromPointatthe device's own centre returns
DIV#canvas-toolbar.There is no workaround inside the device itself: no z-order control, no bring-to-front, no
"send to back", no context menu (see the cable-deletion issue for why the context menu is empty).
The only recovery found was to pan the entire world upward until the device cleared the
toolbar — which moves every other device too, and only works because there happened to be free
canvas above.
Root cause (likely)
#canvas-toolbaris absolutely/fixed positioned over#canvasand does not setpointer-events: noneon its container (only its buttons should take pointer events).occluded by the application's own chrome, nor does it clamp the drop into the visible,
unobstructed canvas region.
Suggested fixes
#canvas-toolbar { pointer-events: none; }withpointer-events: autoon its interactivechildren — the canvas underneath then stays clickable through the toolbar's padding.
never be created in an unreachable position.
inside the
<svg>bounds.Impact
A device can be created in a permanently unusable state, and the only escape is to move the whole
board. This is reachable by ordinary use — the toolbar overlays a real strip of canvas, so a user
zoomed in or working near the bottom of the board will hit it without doing anything unusual.