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

Unselect not working when search field is outside viewport #6294

Open
hovjacky opened this issue Jan 12, 2024 · 0 comments
Open

Unselect not working when search field is outside viewport #6294

hovjacky opened this issue Jan 12, 2024 · 0 comments

Comments

@hovjacky
Copy link

Hi,
I'm recreating this issue #4172 because it still hasn't been solved.

From the original issue:

There's a bug when unselecting an item in a multi-value Select2 while the search field is outside the viewport.

Steps to reproduce :

  1. Create a Select2 control with a lot of options and multiple selection enabled.
  2. Select as many options as necessary to have the search field outside the viewport. You can also reduce the window's size.
  3. Ensure that the Select2 doesn't have the focus.
  4. Unselect an item.

See this jsFiddle : https://jsfiddle.net/qctgeqp1/

Expected outcome :
The unselected item is removed from the Select2 control.

Actual outcome :
The unselected item is not removed from the Select2 control.
The focus is set on the search field.
The viewport is scrolled to show the search field.
The dropdown is shown on Chrome, but not on Firefox.

Tested on Chrome and Firefox with Select2 4.0.1, jQuery 1.12.0.

I haven't found any workaround yet.

Thank you.

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

1 participant