downshift-js/downshift

[useSelect] Selecting item with spacebar in firefox reopens the menu

開放

#1,197 建立於 2020年11月18日

 (5 則留言) (0 個反應) (0 位負責人)JavaScript (980 個分叉)batch import
bughelp wantedneeds investigation

倉庫指標

星標
 (11,761 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

  • downshift version: 6.0.6
  • firefox version: 82.0.3

Relevant code or config

Error present in reference implementation: https://www.downshift-js.com/use-select

What you did:

With firefox, open a menu and select an item with the spacebar key

What happened:

The item was selected, but the menu was reopened. Closely inspecting the result of onStateChange it is revelead that on key down the __menu_keydown_space_button__ is emitted, and on key up the __togglebutton_click__ is emitted.

Error is not present in chrome.

Reproduction repository:

Problem description:

Suggested solution:

貢獻者指南