Skip to content

select: Open the list below the trigger on Windows and Linux - #1435

Merged
madcodelife merged 1 commit into
mainfrom
select-platform-placement
Nov 10, 2026
Merged

madcodelife merged 1 commit into
mainfrom
select-platform-placement

Conversation

@madcodelife

Copy link
Copy Markdown
Member

Summary

On every desktop, Select opened its list over the trigger with the chosen
row laid on it. That is how macOS pop-up buttons behave, but the drop-down
lists of Windows and Linux (WinUI's ComboBox, GTK's DropDown) open below the
trigger, so a select on those platforms did not behave as their own
controls do.

Now the list covers the trigger on macOS only. On Windows, Linux and in
browsers (where the runtime reports the web, not the OS underneath) it
opens below the trigger, as a Combobox already does; placement,
align, offset and margin apply there as they do with nothing chosen.
Terminals keep opening it below the trigger. Phones and tablets keep their
sheet.

Public API

No new API. Behavior change: on Windows, Linux and the web in the desktop
idiom, a Select's list with a chosen item opens below the trigger instead
of over it.

Validation

  • nsh-base tests: new select::on_macos_the_chosen_item_opens_over_the_trigger
    (the popup starts above the trigger so the chosen row lies on it; below it
    with nothing chosen) and
    select::on_windows_and_linux_the_list_drops_below_the_trigger (Windows,
    Linux and the web: below the trigger, at its start, as wide, with an item
    chosen). The select suite passes.
  • Docs: the Select page (English and zh-CN).
  • cargo +nightly fmt --all, cargo clippy -p nsh-base --all-targets.
  • Checked headlessly and on Linux; the macOS path is unchanged by this
    change and was not run on a Mac here.

🤖 Generated with Claude Code

Every desktop opened a Select's list over the trigger with the chosen
row laid on it. That is how macOS pop-up buttons behave; the drop-down
lists of Windows and Linux open below the trigger instead.

The list now covers the trigger on macOS only. Windows, Linux and
browsers open it below the trigger, as a Combobox already does, with
placement, align, offset and margin applying as they do when nothing
is chosen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@madcodelife
madcodelife merged commit e49b02e into main Nov 10, 2026
14 checks passed
@madcodelife
madcodelife deleted the select-platform-placement branch November 10, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant