Added a throttle on mousedown preveting the dropdown from reopening after click to close by EffakT · Pull Request #1837 · selectize/selectize.js

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@EffakT

Copy link Copy Markdown

Contributor

@EffakT EffakT commented

Jul 27, 2022

I found an issue with single selects where clicking on the control to close the dropdown reopens the dropdown due to the click event firing after the mousedown closes the dropdown.
I have added a setting of "closeDropdownThreshold" that defaults to 250ms which prevents the "Click" event from running if it is closed via the mousedown event.
If the user wants the previous functionality (close & reopen when clicking the control), this value can be set to 0.

@risadams risadams merged commit 4c796a2 into selectize:master

Jul 29, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@risadams risadams risadams approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@EffakT @risadams