fix(fuselage): autocomplete overlay on MultiSelectFiltered component#1982
Open
nazabucciarelli wants to merge 3 commits into
Open
fix(fuselage): autocomplete overlay on MultiSelectFiltered component#1982nazabucciarelli wants to merge 3 commits into
nazabucciarelli wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 493b2bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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)
This PR fixes a UI bug where Chrome's native autocomplete/history dropdown overlaps and obscures the custom options list in the MultiSelectFiltered component (specifically observed when searching for users to create a Direct Message in Rocket.Chat).
Root Cause Analysis & Investigation
After deep-diving into the component's history and the recent refactoring, I discovered why this bug suddenly appeared:
The "Before" state (Why Chrome ignored it previously): In older versions of
MultiSelect.tsx, attributes likenameandidwere being spread onto the parent wrapper (). The actual rendered by the anchor was left "anonymous" (without a name attribute). Because it lacked a recognizable name, Chrome's aggressive heuristic engine ignored it and did not attempt to autofill it.The "After" state (Why the bug appeared): During a recent refactoring to improve accessibility and HTML standards, the id and name attributes were explicitly extracted and correctly passed down to the actual element inside renderAnchor. The PR in which this was done is #1940
The small fix
I added
autoComplete="off"directly to the element insideMultiSelectFilteredAnchor.tsxbecause an input used strictly as an internal search/filter for a combobox dropdown should never trigger browser autofill. Hardcoding this protection at the base level ensures the component is inherently safe, rather than relying on the parent to remember to pass the prop.Issue(s)
CORE-2205 [Regression] Persistent history bar remains visible in user search
Further comments