Touch: tapping the A button during dialogue advances two lines

Abierto
#49 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript

Línea de trabajo

Start in src/systems/TouchControls.js (_bind), where the A button fires a synthetic Space keydown, then follow it to InputHandler.handleDialogueInput. Compare that with the pointerdown handler on the overlay in src/DialogueManager.js near line 111. Reproduce by dispatching a touch on .tc-a with ?touch=1 in headless Chrome and checking that dialogue index moves by one. Done when one tap advances once and mouse clicks still behave the same.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

With touch controls on (?touch=1), a touch on the on-screen A button while a dialogue is open advances the dialogue twice.

Cause (from an event trace): the touch fires the button's synthetic Space keydown (src/systems/TouchControls.js _bind), which InputHandler.handleDialogueInput turns into dialogueManager.advance(). The same touch also reaches Phaser as a pointer-down on DialogueManager's full-screen overlay (this.overlay.on('pointerdown', () => this.advance()), src/DialogueManager.js around line 111), which advances again in the same millisecond.

How it was seen: headless Chrome with touch events dispatched over CDP (Input.dispatchTouchEvent) on the .tc-a button; dialogue index went 0 -> 2 from one tap. Mouse clicks on the same button advance once. Not yet confirmed on a real phone.

Likely also affected: the B button (overlay advance, then ESC close).

Possible fix: ignore overlay pointer-downs whose DOM target is inside #touch-controls, or stop the touch event from propagating out of the touch-control buttons.

Found while implementing #5.

Lenguaje dominante
JavaScript
Estrellas
1
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de devhou-se/game

Todos los issues de devhou-se/game

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.