Skip to content

fix(fuselage): prevent MultiSelect dropdown from reopening on toggle click#1870

Open
DammyCodes-all wants to merge 3 commits intoRocketChat:mainfrom
DammyCodes-all:aluminate
Open

fix(fuselage): prevent MultiSelect dropdown from reopening on toggle click#1870
DammyCodes-all wants to merge 3 commits intoRocketChat:mainfrom
DammyCodes-all:aluminate

Conversation

@DammyCodes-all
Copy link
Copy Markdown

Proposed changes (including videos or screenshots)

Fixed an issue in MultiSelect where 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

  • Captured dropdown visibility on mousedown before blur fires.
  • Updated click toggle logic to use captured visibility state.
  • Kept outside-click close behavior unchanged.
  • Preserved normal open-on-click behavior when the dropdown is closed.

Validation

  • Verified component behavior manually in Storybook.
  • Ran focused tests for MultiSelect successfully.

Issue(s)

Closes #1869

Further comments

The root cause was event ordering (mousedownblurclick): 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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 26, 2026

⚠️ No Changeset found

Latest commit: 4a57f90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 26, 2026

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

MultiSelect DropDown: Dropdown reopens when ever the close toggle is clicked

2 participants