Skip to content

Accept the double-click the empty canvas asks for - #220

Merged
sorenwacker merged 1 commit into
mainfrom
fix-empty-canvas-doubleclick
Aug 4, 2026
Merged

Accept the double-click the empty canvas asks for#220
sorenwacker merged 1 commit into
mainfrom
fix-empty-canvas-doubleclick

Conversation

@sorenwacker

Copy link
Copy Markdown
Owner

The builder canvas prints "Double-click to add an entity" whenever a spec has no entities. That is precisely when no vis network exists to carry a doubleClick: the container is replaced with the message div and nothing is listening, so the invitation cannot be followed at the one moment it is offered.

The empty canvas now wires the double-click to the container itself, and clears it again once a network exists so a double-click on a node does not also open the modal.

Covered by a browser test that resets to an empty spec, double-clicks the message, and waits for the add-entity modal — red before the change.

The canvas prints "Double-click to add an entity" when a spec has no entities,
but that is exactly when no vis network exists to carry a doubleClick: the
container is replaced with the message and nothing listens. The invitation
could not be followed at the one moment it was offered.
@sorenwacker
sorenwacker merged commit 4ee4a3e into main Aug 4, 2026
4 checks passed
@sorenwacker
sorenwacker deleted the fix-empty-canvas-doubleclick branch August 4, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant