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

Hovered option is automatically selected on blur #2085

Open
brandonkelly opened this issue Feb 14, 2024 · 3 comments
Open

Hovered option is automatically selected on blur #2085

brandonkelly opened this issue Feb 14, 2024 · 3 comments

Comments

@brandonkelly
Copy link

I did:

  • Search for if my issue has already been submitted
  • Make sure I'm reporting something precise that needs to be fixed
  • Give my issue a descriptive and concise title
  • Create a minimal working example on JsFiddle or Codepen (or gave a link to a demo on the Selectize docs)
  • Indicate precise steps to reproduce in numbers and the result, like below

Description

When you hover over an item and then press Tab to move focus to another input, the item that was being hovered over is automatically selected.

Steps to reproduce

  1. Tab into a Selectize input (such as the one here) to focus it.
  2. Hover over an item – but don’t mousedown or press Return, etc.
  3. Tab out of the Selectize input to blur it.

Expected result

No change to the Selectize input is made, since no explicit action was taken suggesting a new value should be selected.

Actual result

The hovered item is automatically selected.

Video demonstration

Here’s a video demonstration using the Dynamic Option Groups example input. Note the position of the cursor the first two times the Selectize field is focused (up above the input) versus the third time (below the input, where the menu will expand to).

CleanShot.2024-02-14.at.08.53.25.mp4
@winzig
Copy link

winzig commented Mar 19, 2024

Set selectOnTab to false.

@brandonkelly
Copy link
Author

Aha, thank you @winzig! Seems like that should probably be the default behavior…

@winzig
Copy link

winzig commented Mar 20, 2024

Theoretically it is: https://selectize.dev/docs/usage

But I haven't tested that in a while on the standard distribution.

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

No branches or pull requests

2 participants