[Autocomplete] Autocomplete Popper position breaks when container height changes #44797
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
waiting for 👍
Waiting for upvotes
Milestone
Steps to reproduce
Steps:
Important: The issue can only be observed if
disableCloseOnSelect
is set totrue
Current behavior
Popper position stays the same and does not follow the input. When a condition is met that collapse is retracting, popper's position gets recalculated to the where it should have been on the previous render
Expected behavior
Popper should "stick" to Autocomplete input no matter the Autocomplete position
Context
I am aware of the fact that Popper's position for Autocomplete is always 'fixed'. I have tried to use
slotProps
to settransition: true
for the popper, but it causes it to default to top left position of the screen regardless ofanchorEl
ifdisablePortal=true
. It also starts throwing warnings that "Empty string was passed to getElementById" from useAutocomplete.ts (which I'm not using).The reason I was trying to use the
transition
prop is that from my many attempts to fix this, I've got one case where it did fix the issue, but I could not reproduce it since then. In any case this is very frustrating.Browsers: Firefox, Chromium
Your environment
npx @mui/envinfo
Search keywords: autocomplete popper collapse transition
The text was updated successfully, but these errors were encountered: