Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Work around downshift+autofocus regression #9049

Merged

Conversation

robojumper
Copy link
Member

In an attempt to improve accessibility, downshift.js v7.0.0 opens the menu when the input receives focus: downshift-js/downshift#1439 / downshift-js/downshift#1440.

This means the item picker sheets will now show the search completion dropdown directly when opening them since they have autofocus (e.g. in loadouts, LO's subclass picker, ...), making the item picker much less useful.

From the issue comments, downshift will likely switch to using explicit clicks for opening/closing, but this just restores the previous behavior until downshift can figure its stuff out.

@robojumper robojumper requested a review from bhollis February 2, 2023 19:28
@@ -316,14 +322,15 @@ function SearchBar(
return {
...changes,
selectedItem: state.selectedItem, // keep the last selected item (i.e. the edit field stays unchanged)
closeMenu: true, // close the menu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not advertised in the types and Downshift doesn't seem to read it.

@bhollis bhollis merged commit bb6ed08 into DestinyItemManager:master Feb 3, 2023
@robojumper robojumper deleted the fix-combobox-regression branch February 13, 2023 14:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants