Skip to content
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

Long option causes menu to open in wrong position #776

Open
Vikciux opened this issue Mar 16, 2023 · 4 comments
Open

Long option causes menu to open in wrong position #776

Vikciux opened this issue Mar 16, 2023 · 4 comments
Labels

Comments

@Vikciux
Copy link

Vikciux commented Mar 16, 2023

Version

6.0.2

Steps to reproduce

  1. Go to https://codesandbox.io/s/react-typeahead-bug-with-long-labels-ix81kd
  2. open typeahead menu
  3. notice that menu is shifted to the left edge of the view
  4. start scrolling options and notice that menu position fixes itself

Expected Behavior

Menu is aligned with input when opened.

Actual Behavior

Menu is shifted to the left edge of the view once opened. Menu position gets fixed once you start scrolling.

I can reproduce it with Chrome and FF.

Capture

@Vikciux Vikciux added the bug label Mar 16, 2023
@ericgio
Copy link
Owner

ericgio commented Mar 22, 2023

Hey @Vikciux thanks for the report and the sandbox reproducing the issue. It looks like the issue reproduces even without a long menu item label if you make the window narrower and try to re-open the menu. Seems like the popper might be getting stale reference element dimensions or something.

@Vikciux
Copy link
Author

Vikciux commented Apr 24, 2023

Thanks for the great component! Providing a comprehensive report is the least I can do.

Any idea when we can expect a fix?

@ericgio
Copy link
Owner

ericgio commented Apr 25, 2023

@Vikciux I don't have a timeframe for a fix at the moment. If you'd like to spend some time pinpointing the issue or even submitting a fix, that'd be helpful :)

@mistahoward
Copy link

I was having a lot of issues getting typeahead to build locally for me to test and debug. Looks like popper dropdown menu inset isn't set correctly. If you modify the inline css for inset-right to auto on the dropdown menu, it's correctly aligned. YMMV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants