Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Added a throttle on mousedown preveting the dropdown from reopening after click to close#1837

Merged
risadams merged 1 commit into
selectize:masterfrom
EffakT:master
Jul 29, 2022
Merged

Added a throttle on mousedown preveting the dropdown from reopening after click to close#1837
risadams merged 1 commit into
selectize:masterfrom
EffakT:master

Conversation

@EffakT

@EffakT EffakT commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants