Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Tearsheet: Escape should only close the active topmost layer

Aperta
#989 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
10
Fork
40
Merge medio
23h 23m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di patternfly/react-component-groups

Tutte le issue di patternfly/react-component-groups

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.