Skip to content

Implement real popup selection for collapsed HTML select controls #44

Open

Description

@danwalmsley

Current implementation checkpoint — 20 September 2026

The WebScene-rendered collapsed-select popup architecture and core implementation are merged through PR #66. Current WebScene main is 947e9b7726674d4e15b119a184fbc85a0c575457. No #44 implementation branch is active.

Remaining work is broader acceptance and follow-up: browser-sensitive focus/keyboard details, long-list/RTL/transform/viewport mutation cases, unchanged Kestrel behavior, composition above GPU/video, native accessibility exposure, and the optional AppScene popup-window host when out-of-surface placement is required. The same WebScene-rendered popup must remain authoritative.

Problem

Collapsed HTML <select> controls do not open a dropdown in WebScene. This is visible in the unchanged Kestrel CAD sample. Clicking currently cycles immediately to the next option, preventing users from inspecting and choosing from a list.

This is a general form-control compatibility gap, separate from WebGPU implementation in epic #22. Track it separately so it does not interrupt GPU qualification.

Accepted architecture

PR #66 records and implements the agreed direction:

  • standard <select>/<option>/<optgroup> remain the application API;
  • WebScene owns select behavior and dropdown rendering;
  • dropdown presentation is WebScene-rendered HTML/CSS with native C++ behavior;
  • popup hosting is separate from popup rendering;
  • the default host is an in-surface WebScene overlay;
  • a future AppScene/platform popup host may place the same WebScene-rendered popup into a real OS popup window, but that window is only a container for a WebScene rendering surface, not an OS-native dropdown widget;
  • native control presenters remain a separate option, especially for menus/context menus and other controls where platform-native integration is itself desirable.

Architectural rule: hosting may be native; dropdown rendering remains WebScene-rendered.

Current implementation

The implementation in PR #66 removes the click-to-cycle fallback for collapsed single selects and adds an engine-owned in-surface popup. The popup uses a closed private shadow tree, mirrors authoritative option state without replacing the authored options, and renders through the normal WebScene scene/layout pipeline.

The implementation includes pointer selection, pending keyboard highlight with explicit commit, Escape/outside cancellation, disabled options/optgroups, scrolling, basic type-ahead, viewport placement, option-identity commits, and stale option-state detection. Input/change are emitted only when committed option identity actually changes.

The existing Web Platform contract and native runtime regression are changed from click-to-cycle to open/commit/cancel behavior. The native regression also checks disabled-optgroup keyboard navigation and that outside-click dismissal does not leak the pointer gesture into content underneath.

Remaining acceptance / follow-up

Keep this issue open until broader qualification is complete:

  1. Qualify browser-sensitive keyboard/event details and focus behavior across supported desktop platforms.
  2. Cover long-list scrolling, RTL, transforms, viewport edges, resize/display-scale changes and mutation/reentrancy cases comprehensively.
  3. Verify unchanged Kestrel dropdowns can open and choose non-adjacent values and drive expected CAD behavior.
  4. Verify composition above WebGPU/video does not disturb image retirement/presentation.
  5. Implement and verify the native accessibility bridge for the owning select/listbox semantics.
  6. Add the optional AppScene/platform popup-window host when out-of-surface presentation is required; it must host the same WebScene-rendered popup rather than replace it with an OS-native dropdown.
  7. Keep multiple/size > 1 listbox semantics distinct.

Do not close based solely on a static popup screenshot, request parser, or programmatic value assignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions