fix(drive-integration): multiselect popover misalignment when list is not scrollable [INTEG-4038]#10996
Open
Franco Banfi (FBanfi) wants to merge 2 commits into
Conversation
…s not scrollable When a search query filters the list short enough that maxScroll is 0, the scroll-nudge trick produces no scroll event, so Floating UI never repositions the popover and the portal appears misaligned. Fall back to dispatching a window resize event, which autoUpdate listens to by default. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.
Purpose
When a search query filters the multiselect list short enough that it is no longer scrollable, the popover portal loses alignment with the trigger input. The previous reflow hack relied on nudging
scrollTopto trigger a scroll event — but whenmaxScroll === 0, no scroll event fires and Floating UI never repositions.Approach
Replace the scroll-nudge trick in
useMultiselectScrollReflowwithwindow.dispatchEvent(new Event('resize')). Floating UI'sautoUpdatesubscribes towindowresize events by default, so this always triggers a position recalculation regardless of list height. The fix is simpler, more robust, and applies uniformly to all three consumers of the hook:step_2/ContentTypePickerModal.tsxstep_3/SelectTabsModal.tsxreview/mapping/edit-modals/FieldSelectionDropdown.tsxTesting steps
Before:
Grabacion.de.pantalla.2026-05-20.a.la.s.3.34.07.p.m.mov
Now:
Grabacion.de.pantalla.2026-05-21.a.la.s.11.43.15.a.m.mov
Breaking Changes
No.
Dependencies and/or References
Link to INTEG-4038
Deployment
No.
🤖 Co-authored with Claude Code