ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/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ệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu tại useComboBox, nơi issue cho biết useSelectableCollection xử lý sự kiện keydown của ô nhập liệu khi popover đang mở, rồi kiểm tra các bài kiểm thử ComboBox hiện có về thao tác bàn phím. Xác minh rằng Cmd/Ctrl+A chọn văn bản trong ô nhập liệu ở chế độ chọn nhiều khi popover đang mở, đồng thời giữ nguyên hành vi được ghi trong tài liệu của chế độ chọn đơn; thêm hoặc cập nhật một bài kiểm thử tập trung vào kết quả mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Provide a general summary of the issue here
In a multi-select ComboBox, pressing Cmd+A / Ctrl+A doesn't select the text in the input while the popover is open. It doesn't select any options either, so the shortcut just does nothing.
🤔 Expected Behavior?
Cmd/Ctrl+A selects the text in the input, same as with selectionMode="single" or when the popover is closed.
😯 Current Behavior
Nothing happens. The keydown is default-prevented, so the browser doesn't select the text, and the selection doesn't change. As far as I can tell:
- useComboBox applies the onKeyDown from useSelectableCollection to the input while the popover is open. It doesn't pass disallowSelectAll.
- In multiple selection mode, useSelectableCollection handles Mod+A by calling manager.selectAll(). The handler returns undefined, so the event gets preventDefault().
- selectAll() calls onSelectionChange('all'), and useComboBoxState ignores that (if (keys === 'all') return;).
💁 Possible Solution
Pass disallowSelectAll: true to useSelectableCollection in useComboBox. Select-all-options from a text field seems unexpected to me
🔦 Context
We use a multi-select ComboBox in forms. Users can't use Modl+A to clear or replace what they've typed in the filter input.
🖥️ Steps to Reproduce
<ComboBox selectionMode="multiple">
<Label>Fruit</Label>
<Input />
<Button>▼</Button>
<Popover>
<ListBox>
<ListBoxItem>Apple</ListBoxItem>
<ListBoxItem>Banana</ListBoxItem>
<ListBoxItem>Cherry</ListBoxItem>
</ListBox>
</Popover>
</ComboBox>
- Type "an" so the popover opens.
- Press Cmd/Ctrl+A. Nothing gets selected.
Version
react-aria-components 1.22.0
What browsers are you seeing the problem on?
Firefox
If other, please specify.
No response
What operating system are you using?
MacOS 26
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 16k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 45
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 adobe/react-spectrum
-
accessibility bug PreviewTrigger
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
adobe/react-spectrum#10917 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitCó thể đã có người làm @darshpatel1052 đã nhận 2 ngày trước. Đang mởwaiting on author
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
adobe/react-spectrum#10909 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValueCó thể đã có người làm @mrlexcoder đã nhận 2 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
adobe/react-spectrum#10900 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Separator adds a redundant role="separator" to its default <hr>Có thể đã có người làm @Janani-bn đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
adobe/react-spectrum#10894 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Có thể đã có người làm @mangeshraut712 đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adobe/react-spectrum#10856 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của adobe/react-spectrum
Issue tương tự
-
area: infrastructure bug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
snapotter-hq/SnapOtter#4575 ·
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 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation server-memory v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/servers#5457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
comp: ssr comp: zones type: feature version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
angular/angularfire#3836 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày