[Button]: crash on Safari 17 due to missing ElementInternals.states guard in _setBadgeOverlayStyle
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 87/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, web-dev
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Đọc packages/main/src/Button.ts và kiểm tra _setBadgeOverlayStyle() cùng lời gọi hàm này từ onBeforeRendering(). Xác nhận cách dự án xử lý mức hỗ trợ ElementInternals.states của trình duyệt, sau đó chạy các bài kiểm thử Button liên quan hoặc tái hiện vấn đề trên Safari 17. Hoàn thành khi các nút được hiển thị không có lỗi và trạng thái badge được áp dụng ở nơi API được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
Button._setBadgeOverlayStyle() unconditionally accesses this._internals.states, which is undefined on Safari 17. This causes an unhandled promise rejection that crashes all UI5 buttons on the page, regardless of whether a badge is used.
Error
TypeError: undefined is not an object (evaluating 'this._internals.states.delete')
Affected Code
packages/main/src/Button.ts → _setBadgeOverlayStyle():
_setBadgeOverlayStyle() {
const needsOverflowVisible = ...;
if (needsOverflowVisible) {
this._internals.states.add("has-overlay-badge"); // crashes
} else {
this._internals.states.delete("has-overlay-badge"); // crashes
}
}
This method is called unconditionally from onBeforeRendering(), so every button render on Safari 17 triggers the crash.
Root Cause
Safari 17 does not support the CSS Custom State API (ElementInternals.states). The property exists on _internals only in browsers that support this API.
Expected Behavior
Buttons render without error on Safari 17. Badge state simply isn't applied (acceptable degradation).
Proposed Fix
this._internals?.states?.add("has-overlay-badge");
this._internals?.states?.delete("has-overlay-badge");
Environment
@ui5/webcomponents: 2.27.2- Browser: Safari 17.0 / macOS Sonoma
- Not reproducible on Chrome or Safari 18+
Affected Component
No response
Expected Behaviour
No response
Isolated Example
No response
Steps to Reproduce
No response
Log Output, Stack Trace or Screenshots
No response
Priority
None
UI5 Web Components Version
2.27.2
Browser
Safari
Operating System
No response
Additional Context
No response
Organization
No response
Declaration
- I’m not disclosing any internal or sensitive information.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 290
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của UI5/webcomponents
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UI5/webcomponents#14273 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Feature Request][Side Navigation][A11Y]: Enhance user experience navigating components tree itemsCó thể đã có người làm @TeodorTaushanov đã nhận 5 ngày trước. Đang mởbug Medium Prio TOPIC RD
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
UI5/webcomponents#14232 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement feature request TOPIC RD
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UI5/webcomponents#14222 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[SF][A11y][ui5-select] Conflicting ARIA: role="combobox" rendered with aria-roledescription="Listbox" (confuses screen-reader users)Có thể đã có người làm @PetyaMarkovaBogdanova đã nhận 9 ngày trước. Đang mởbug Medium Prio TOPIC P
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
UI5/webcomponents#14212 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
(ui5-search): Loading state sample is brokenCó thể đã có người làm @ndeshev đã nhận 9 ngày trước. Đang mởbug Low Prio TOPIC RL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UI5/webcomponents#14210 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của UI5/webcomponents
Issue tương tự
-
area:cards enhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
fil-donadoni/tolaria#8883 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
xsd:integer cast from a string rejects negative numbers, a leading + and surrounding whitespaceĐang mởbug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
comunica/comunica#1960 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-javascript#26203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bytedance/flowgram.ai#1235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
devswha/herdr-web-ui#3325 ·