ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open

オープン 初心者向け
#10,866 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@mangeshraut712 がすでに取り組んでいます。

2026年10月27日 から。

  • #10868 @mangeshraut712 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

useComboBoxから始めます。issueによると、popoverが開いているときの入力フィールドのkeydownイベントはuseSelectableCollectionが処理します。既存のComboBoxのキーボード動作に関するテストを確認してください。popoverを開いた状態で複数選択モードのCmd/Ctrl+Aが入力フィールドのテキストを選択し、ドキュメントに記載された単一選択モードの動作が維持されることを検証します。期待される結果を確認するための対象を絞ったテストを追加または更新してください。

索引モデルが issue の本文から書いたものです。

説明

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>
  1. Type "an" so the popover opens.
  2. 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

主要言語
TypeScript
スター
16k
フォーク
1.6k
平均マージ
3日 9時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adobe/react-spectrum のほかの issue

adobe/react-spectrum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。