Angular ARIA autocomplete selecting options with mouse click or enter don't select them, only with pressing tab.
Maintainer thường phản hồi trong vòng 1 ngày
@ok7sai đang làm issue này rồi.
Từ ngày 1/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
When I setup the Autocomplete component with Angular ARIA components, like in the example provided on the angular website. There is something weird going on with selecting the searched options with a mouse click or pressing Enter.
Reproducing the "bug"
When I use the filterMode auto-select and I search for n, a sub-set of the country list will appear. If I now move to the second or third option in the list and press enter the value in the input field will be filled with the slected option. But when I check the selected option with an effect, it is the first option of the filtered list.
When you do the same filtering and navigate to the second/thrid option and instead press tab. The selected options is actually selected.
I have made a stackblitz example to show this: https://stackblitz.com/edit/stackblitz-starters-xnilgqyl?file=src%2Fmain.ts,src%2Fcomponents%2Fautocomplete.ts
Is this behaviour by design? That the selection only works on the tab-keypress?
Work around
The workaround we are using right now is to also bind query to the [(value)] of the ngComboboxInput, this way we always get the right selection. The drawback is that we get a console error out of ngCombobox.
my-component.container.html:11 ERROR TypeError: Cannot read properties of undefined (reading 'length')
at ComboboxPattern.onFilter (_combobox-chunk.mjs:221:55)
at combobox.mjs:308:46
at untracked (_effect-chunk.mjs:403:12)
at untracked2 (_untracked-chunk.mjs:2957:10)
at combobox.mjs:308:7
at Object.phaseFn (core.mjs:2693:30)
at AfterRenderEffectSequence.hooks.<computed> (core.mjs:2729:41)
at _debug_node-chunk.mjs:4155:27
at _AfterRenderImpl.maybeTrace (_debug_node-chunk.mjs:4212:75)
at _debug_node-chunk.mjs:4153:78
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version)
Anything else?
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 69
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 angular/components
-
bug(material/sort): hover hint arrow on an unsorted header shows the active sort direction, not the resulting direction after click.Có thể đã có người làm @lekhmanrus đã nhận 10 ngày trước. Đang mởarea: material/sort P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
angular/components#33933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(mat-date-picker): month shown twice in date pickerCó thể đã có người làm @PreethiPantangi đã nhận 27 ngày trước. Đang mởarea: material/datepicker P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
angular/components#33763 · 2 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug in table.scss footer cell height: unset instead of footer row height unsetCó thể đã có người làm @minwookshin đã nhận 14 ngày trước. Đang mởarea: material/table P4
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
angular/components#33709 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs-bug(Table): Add example with `rowspan`Có thể đã có người làm @BHUVANSH855 đã nhận 95 ngày trước. Đang mởarea: material/table docs P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
angular/components#33455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(date-adapter): Misleading JSDoc for createDate returns typeCó thể đã có người làm @BHUVANSH855 đã nhận 144 ngày trước. Đang mởarea: material/core P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
angular/components#33059 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của angular/components
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
voidzero-dev/void#478 ·
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 69/100
Small-tailqwq/dsh-deep-whale#207 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The inspector never shows the instances field, so scaling out is unreachableCó thể đã có người làm @Mrkewl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
xevrion/breakscale#96 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Flux159/mcp-server-kubernetes#384 ·