self-loops: the connection is delivered but the trailing node click erases it #97
Loading…
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?
Self-loops are meant to work:
TerminalEdge.sveltealready renders a dedicated arc forsource === target, xyflow validates the drag (connectingto validmid-drag), andonconnectfires. But the editor never opens.Root cause (reproduced with instrumented playwright): after a self-connection drop, the trailing
clickevent lands on the node body (DIV.state, same state).onnodeclick→selectState→clearSelection()→ wipes thependingConnectionthatonconnectjust set. Cross-node drops survive because their trailing click lands on the nodes layer, not the node (verified: SELF click target =DIV.state node=q0; CROSS click target =DIV.svelte-flow__nodes).Fix: in
FaCanvas.svelteonnodeclick, ignore the click when apendingConnectionis open (the pending transition editor is committed via ADD or dismissed via DISCARD / pane click). Deterministic, no timers, keeps two-state behavior unchanged.Acceptance: playwright drag right handle → left handle of the same state must open the NEW TRANSITION editor; committing a symbol renders the self-loop arc; two-state connection still works; screenshots for both.