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

selectlist: Implement new keyboard behavior #42068

Merged
merged 1 commit into from
Oct 10, 2023

Commits on Oct 10, 2023

  1. selectlist: Implement new keyboard behavior

    This patch implements several keyboard behaviors:
    - Enter while the listbox is closed should not open the listbox and
      should instead submit the form.
    - Enter while the listbox is open should select/commit the currently
      focused option and close the listbox.
    - Space should open the listbox.
    - Arrow keys while the listbox is open should not commit the newly
      focused value.
    - Arrow keys while the listbox is closed should open the listbox.
    
    These were resolved on in OpenUI here:
    - openui/open-ui#433 (comment)
    - openui/open-ui#386 (comment)
    - openui/open-ui#742
    
    This patch also implements the resolution here to stop changing the
    visible value of the selected option while the user is switching the
    focused option using the arrow keys:
    
    Fixed: 1422275
    Change-Id: If5e7328ad739f9c7339dcd17561c57875d4255e7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4876791
    Commit-Queue: Joey Arhar <jarhar@chromium.org>
    Reviewed-by: Mason Freed <masonf@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1207785}
    josepharhar authored and chromium-wpt-export-bot committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    d61c0f0 View commit details
    Browse the repository at this point in the history