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

Select2 automatically selects a value #6187

Open
RepeaterCreeper opened this issue Sep 7, 2022 · 1 comment · May be fixed by #6195
Open

Select2 automatically selects a value #6187

RepeaterCreeper opened this issue Sep 7, 2022 · 1 comment · May be fixed by #6195

Comments

@RepeaterCreeper
Copy link

RepeaterCreeper commented Sep 7, 2022

Use Case Scenario
So the scenario is I have a dropdown that I need to have a VALUE for. If it's empty, then I will need to show a specific element. The problem is, currently when I press the select2 dropdown clear button. It does show the elements I need that are previously hidden, but it automatically selects a value.

View the working replication.

Reproduction Steps via Clone

  1. Open the link.
  2. Press the clear button in the select dropdown.
  3. You will see that this automatically selects a value.

Browsers Tested
All of these were tested on Windows 10 10.0.19043 Build 19043 and Windows 11 Pro 10.0.22000 Build 22000.

  1. Chrome Browser 105.0.5195.102 (Official Build) (64-bit) (cohort: 105_Win_102)
  2. Mozilla Firefox 104.0.2 (64-bit)

I'm using the latest version of Select2 which is 4.0.13.

@karaliunas
Copy link

Same issue here. Changing mouseup to click event solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants