From 3ca8bf0e6e4bf9f3d91280a6a5e9e8b8dc7607d8 Mon Sep 17 00:00:00 2001 From: David Montero Crespo Date: Tue, 28 Jul 2026 15:33:24 +0200 Subject: [PATCH] =?UTF-8?q?feat(canvas):=20contrato=20ownsPointer=20?= =?UTF-8?q?=E2=80=94=20tocar=20una=20pantalla=20tactil=20en=20Run=20no=20l?= =?UTF-8?q?a=20arrastra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La whitelist de tags que poseen el puntero durante la simulacion gana una salida generica regla-6a: el elemento declara `get ownsPointer() { return true }` y el wrapper no inicia el drag mientras corre. El cristal del Round Display pintaba el punto verde Y arrastraba el shield por el canvas a la vez. --- frontend/src/components/DynamicComponent.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/DynamicComponent.tsx b/frontend/src/components/DynamicComponent.tsx index e322d07d..b85b5786 100644 --- a/frontend/src/components/DynamicComponent.tsx +++ b/frontend/src/components/DynamicComponent.tsx @@ -480,7 +480,13 @@ export const DynamicComponent: React.FC = ({ tag === 'wokwi-analog-joystick' || tag === 'wokwi-ky-040' || tag === 'wokwi-membrane-keypad' || - tag === 'wokwi-rotary-dialer'); + tag === 'wokwi-rotary-dialer' || + // Rule-6a escape hatch: a (possibly private-overlay) element whose + // surface IS the interaction — a touch screen — declares it via a + // property instead of this list growing pro tag names. While the + // sim runs, touching it must touch, not drag: the Round Display's + // glass was painting the green dot AND dragging the shield around. + (target as { ownsPointer?: boolean }).ownsPointer === true); if (ownsPointer) { // Let the wokwi component own this pointerdown. return;