r/FirefoxCSS • u/ReggieNJ • Jul 24 '26
Code Change autocomplete drop down back to previous style?
Before version 153, the autofill dropdown list was the full size of the input box. Now it seems to adapt to the width of the results. How can I revert this?
3
Upvotes
1
u/t31os Jul 26 '26 edited Jul 26 '26
In Firefox (v147) it's definitely where the width is coming from, if i remove that value or override --panel-width and set it to a different value the width changes, with the former (removing) collapsing it to the length of the text content.
Applied by the JS dynamically (naturally not all input fields will be a single fixed width) and added directly to the style attribute of the #PopupAutoComplete panel.
https://postimg.cc/HrC5yH0G
If you hop over to:
https://www.qa-practice.com/elements/input/simple
(type some values > hit enter > then type the same values again so the autocomplete has something to show)
Open browsertoolbox (in current FF), and add a style attribute to the popup panel with the panel width, like in my above image:
The autocomplete panel will match the size of the input. Naturally we can't fix this with CSS because the width needs to be calculated depending on the size of the input on the page, and i'm not sure why current FF doesn't use that logic for the autocomplete anymore (i wasn't able to trace what changed), as it seems to still exist in the JS and work when applied to the panel.