Skip to content

Autocomplete input causes view jump when selecting a long option on Android #45939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lukagrbec opened this issue Apr 17, 2025 · 0 comments
Open
Labels
component: autocomplete This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it

Comments

@lukagrbec
Copy link

lukagrbec commented Apr 17, 2025

Steps to reproduce

  1. Use an Android device to open this link to a live example: https://react-tkbu89tn.stackblitz.io

  2. Tap on the Autocomplete input.

  3. Select a very long option from the list.

  4. Observe that after selection, the Card (or scrollable container) jumps to the right unexpectedly.

Current behavior

When using Autocomplete inside a horizontally scrollable container (like a Card with overflow-x: auto), selecting an option that has a long label causes the container to jump/scroll horizontally, even though the TextField has a fixed width and is styled correctly (overflow: hidden, text-overflow: ellipsis).

As a result, the user experience feels broken: after selecting an option, the view suddenly shifts, and part of the content may get hidden off-screen.

This behavior happens only on Android devices.

Link to StackBlitz: https://stackblitz.com/edit/react-tkbu89tn?file=Demo.js

Expected behavior

  • The selected value should appear inside the input field.
  • The input field should remain in the same visual position after selection.
  • No horizontal scroll or view jump should happen automatically (as it correctly behaves on non-Android devices).

Context

No response

Your environment

Search keywords: component: autocomplete

@lukagrbec lukagrbec added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 17, 2025
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 18, 2025
@ZeeshanTamboli ZeeshanTamboli added external dependency Blocked by external dependency, we can’t do anything about it and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

4 participants