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) {