Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix osu! dropdown no longer handling Enter key to select items #28632

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

frenzibyte
Copy link
Member

The functionality of selecting a dropdown item by Enter has been changed to be triggered by a commit event from the dropdown search bar's text box, since the text box is in a focused state when the dropdown is open and therefore is the first to receive any input by the user (see ppy/osu-framework@b12e4b1).

The osu!-side implementation of the search bar was relying on SearchTextBox, which has commits disabled, therefore Enter has no longer been working.

This PR not only enables commits on the search bar, but also uses OsuTextBox directly to avoid any potential nuances from the focus logic in SearchTextBox/FocusedTextBox.

Includes a refactor of `ThemeComparisonTestScene` to allow accessing a manual input manager.
I've also removed inheritance from `SearchTextBox` because it contains
logic that might interfere with the internal implementation of dropdown
search bars (focus logic and stuff).
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

Seems ok to me

@smoogipoo smoogipoo merged commit e6a5131 into ppy:master Jun 27, 2024
12 of 16 checks passed
@frenzibyte frenzibyte deleted the fix-dropdown-enter-key branch June 27, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use Enter key to select dropdown menu items
2 participants