From 5bd157c059ea3b3f4a88b6c6d55cd3986b608fa3 Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Fri, 20 Mar 2026 04:24:39 +0100 Subject: [PATCH] fix: only show port label prompt inside component editor Double-click rename for INPUT/OUTPUT/CLOCK gates now only triggers when inside the component editor, not in the main circuit. Co-Authored-By: Claude Opus 4.6 --- js/events.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/events.js b/js/events.js index cf1e540..557658b 100644 --- a/js/events.js +++ b/js/events.js @@ -159,8 +159,8 @@ export function initEvents() { return; } - // Double-click on I/O gates → rename - if (gate.type === 'INPUT' || gate.type === 'OUTPUT' || gate.type === 'CLOCK') { + // Double-click on I/O gates → rename (only inside component editor) + if (state.componentEditorActive && (gate.type === 'INPUT' || gate.type === 'OUTPUT' || gate.type === 'CLOCK')) { const current = gate.label || ''; const label = prompt(`Label for ${gate.type}#${gate.id}:`, current); if (label !== null) {