fix(fuselage): prevent MultiSelect dropdown from reopening on toggle click#1870
Open
DammyCodes-all wants to merge 3 commits intoRocketChat:mainfrom
Open
fix(fuselage): prevent MultiSelect dropdown from reopening on toggle click#1870DammyCodes-all wants to merge 3 commits intoRocketChat:mainfrom
DammyCodes-all wants to merge 3 commits intoRocketChat:mainfrom
Conversation
…and prevent the weird reopening error
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
Fixed an issue in
MultiSelectwhere clicking the chevron or select body while the dropdown was open could cause it to close and immediately reopen.This update makes toggle behavior deterministic by using the pre-blur interaction state, so clicking the control now properly closes the menu and prevents the weird reopening error.
What changed
mousedownbefore blur fires.Validation
MultiSelectsuccessfully.Issue(s)
Closes #1869
Further comments
The root cause was event ordering (
mousedown→blur→click): blur was hiding first, then click handler saw a closed state and reopened.The implemented fix resolves that race without changing the public API or expected keyboard/outside-click behavior.
videos
Before
https://github.com/user-attachments/assets/af12670c-81c9-4911-9a48-06e09db4bd20
After
https://github.com/user-attachments/assets/282abc72-9546-42b1-907a-314a37bfc161