Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Tearsheet: Escape should only close the active topmost layer

Abierto
#989 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Start from the Tearsheet and modal components that handle Escape-key events, then reproduce the nested-modal and stacked-Tearsheet cases described in the issue. Trace which layer receives the event and inspect existing tests around modal dismissal; done means Escape closes only the active topmost layer while underlying layers remain open.

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

Descripción

Problem

When a Tearsheet opens another modal, such as a file-selection modal, pressing
Escape closes both the modal and the underlying Tearsheet.

This suggests that the Escape-key event is being handled by multiple layers rather
than only by the active topmost layer. With stacked Tearsheets, the same behavior
could dismiss multiple workflow levels with a single keypress and unexpectedly
discard in-progress work.

Steps to reproduce

  1. Open a Tearsheet.

  2. Open a modal or file-selection flow from within the Tearsheet.

  3. Press Escape.

  4. Observe that both the nested modal and the underlying Tearsheet close.

  5. Repeat with multiple stacked Tearsheets and verify whether one Escape

    dismisses more than the active layer.

Here I hit escape to cancel out of the modal but all views are closed:

image

Expected behavior

Pressing Escape should dismiss only the active topmost modal or Tearsheet.
Underlying layers should remain open, and the event should not continue to
trigger their close handlers.

Context

This was observed in
odh-dashboard#9589.
The follow-up discussion is
here.

Related stacked-modal accessibility work:


Jira Issue: PF-4706

Lenguaje dominante
TypeScript
Estrellas
10
Forks
40
Merge medio
23 h 23 min
PR fusionados (30 d)
2

Preparar el entorno

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 patternfly/react-component-groups

Todos los issues de patternfly/react-component-groups

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.