Support non-focusable disabled state.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu từ các điểm vào StacksEditor disable()/enable() và kiểm tra cách trạng thái readonly hiện có ảnh hưởng đến tiêu điểm và điều hướng bằng bàn phím. Xác minh hành vi dựa trên ví dụ về input native; được xem là hoàn tất khi editor bị vô hiệu hóa bị bỏ qua khi focus bằng chuột và TAB, trong khi readonly vẫn là một trạng thái riêng biệt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
I have the editor in a form which manages progression such that the user cannot skip fields - this is done mostly by disabling future inputs. With native input elements, we have a distinction between readonly and disabled wherein the latter prevents focus events from either a mouse or keyboard. With the Stacks-Editor, we have a readonly property which can be set using disable()/enable(). The mix in language is not only confusing but for my purposes above, readonly alone is insufficient to stop users from navigating through the editor's internal elements (i.e. the toolbar items) via TAB keyboard navigation (despite stopping focus via mouse).
Describe the solution you'd like
I would like to have a disabled state which holds similar behavior to a regular ol' <input disabled ... /> and is separate from the readonly state. Specifically, if disabled, the editor should not be focusable and when navigating through a parent form via TAB, the editor should be skipped.
I'd expect navigation behavior similar to native HTML inputs like attempting to tab through the following:
<input type="textarea" placeholder="normal">
<input type="textarea" readonly placeholder="readonly">
<input type="textarea" disabled placeholder="disabled">
<input type="textarea" placeholder="normal">
Proposal
StacksEditor {
...
disabled: boolean = false,
disable() { disabled = true },
enable() { disabled = false },
...
}
readonly should change to have its own modifiers to avoid confusion.
Describe alternatives you've considered
Without this functionality inside of Stacks-Editor, I can add event listeners and hijack TAB-key events but that quickly snowballs to handling the editor in different states, moving between interactive elements inside of the editor like the toolbar and content, and then doing it all over again for SHIFT + TAB to go in reverse.
Additional context
Could be a breaking change in that ideally pre-existing disable()/enable() would be used to modify the disable state rather than readonly.
- Ngôn ngữ chính
- TypeScript
- Star
- 440
- Fork
- 61
- Merge trung bình
- 19 giờ 52 phút
- Pull request đã merge (30 ngày)
- 23
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 StackExchange/Stacks-Editor
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#504 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
StackExchange/Stacks-Editor#395 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#343 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Task list supportĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#272 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Math formulas supportĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
StackExchange/Stacks-Editor#250 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của StackExchange/Stacks-Editor
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
linagora/twake-mail-admin#301 ·
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 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#56038 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày