mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-11-03 17:22:20 +01:00
Tapping the navbar channel selector focused a text input, so Android raised the on-screen keyboard on every channel switch — half the screen covered for a list that is four or five items long. The type-to-filter it enabled solved a problem nobody has: the firmware caps how many channels a device holds, so there are never enough to search. #channelSelectorInput becomes #channelSelectorButton, a <button> carrying the same .form-select chrome, and click toggles the dropdown. The list itself is unchanged (previews, unread badges, favourites, muted styling), so renderChannelDropdownItems() just loses its query parameter and the channels.dropdown.no_matches key goes with it. Keyboard access is kept: Enter/Space opens, arrows move, Enter selects, Escape closes — the keydown handler now bails out while the dropdown is closed so Enter performs a plain button activation instead of picking the first row. Verified locally at 360px: focus lands on the button (never an editable element), open/toggle/select/outside-click/Escape all behave, 0 console errors, and the control renders identically in light and dark themes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>