diff --git a/web-ui/arduino-emulator.html b/web-ui/arduino-emulator.html index 6ab8da9..e46344f 100644 --- a/web-ui/arduino-emulator.html +++ b/web-ui/arduino-emulator.html @@ -7945,12 +7945,10 @@ function mobToggleBoard(){ overlay.addEventListener('click', closeZoom); document.addEventListener('keydown', e => { if (e.key === 'Escape') closeZoom(); }); - // TFT / OLED 캔버스에 클릭 핸들러 연결 (DOM 준비 후) - document.addEventListener('DOMContentLoaded', () => { - ['tft-canvas', 'oled-canvas'].forEach(id => { - const c = document.getElementById(id); - if (c) c.addEventListener('click', () => openZoom(c)); - }); + // body 끝에서 실행되므로 DOM 이미 준비됨 — 직접 연결 + ['tft-canvas', 'oled-canvas'].forEach(id => { + const c = document.getElementById(id); + if (c) c.addEventListener('click', () => openZoom(c)); }); // canvas가 나중에 그려질 수 있으므로 전역 노출