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

Ensure that there is always an active option in the Combobox #1279

Merged
merged 3 commits into from
Mar 29, 2022

Commits on Mar 29, 2022

  1. ensure that the first option is always active

    This will ensure that the first non-disabled option is the active one if
    no other active options exist. This means that any time you search for
    something that the first result is the active one and you can just press
    <kbd>Enter</kbd> to activate the option.
    
    However, there are a few rules that we have to take into account:
    - If you just open the Combobox, and there is a `selected`
      Combobox.Option, then we can't make the first option the active one.
      The first selected Combobox.Option has precedence over this one. This
      is important and rather tricky because Combobox.Option's register
      themselves at some point (later) in time.
    - If you already have an active option, then that option should stay
      active. If it changes position, then the activeOptionIndex is adjusted
      to account for that.
    - If you "mouse leave" an option, then no option should be active. It
      will be re-enabled the moment you start typing OR if you re-open the
      Combobox. Otherwise, it can happen that you are at the bottom of the
      list, mouse leave, and we scroll all the way back up to make the first
      item the active one which is not good for UX reasons.
    RobinMalfait committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    7c2f0a1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d31267 View commit details
    Browse the repository at this point in the history
  3. update changelog

    RobinMalfait committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    be60fd9 View commit details
    Browse the repository at this point in the history