Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Tearsheet: Escape should only close the active topmost layer

Đang mở
#989 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
10
Fork
40
Merge trung bình
23 giờ 23 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của patternfly/react-component-groups

Tất cả issue của patternfly/react-component-groups

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.