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

Dropdown will jump #6715

Open
3 tasks done
eric-burel opened this issue Oct 24, 2023 · 0 comments
Open
3 tasks done

Dropdown will jump #6715

eric-burel opened this issue Oct 24, 2023 · 0 comments
Labels

Comments

@eric-burel
Copy link

eric-burel commented Oct 24, 2023

Prerequisites

Describe the bug

Dropdown menu of the DropdownButton will do an horizontal jump when the bottom of the menu enters the screen.

This is due to the property x-placement switching from "bottom-start" to "bottom-end", and this attribute being associated with different translation.

This bug came to our attention here Devographics/Monorepo#287 when running the State of JS survey

Expected behavior

No jump, the "x-placement" attribute should be stable.

At least we should be able to lock it. By the way I couldn't observe the impact of the menu alignement from the doc.

To Reproduce

  1. Go to the official documentation, check the DropdownButton alignment section
  2. Add more items or tweak your viewport so that the menu will have more height than the viewport
  3. Scroll down => menu will jump

Reproducible Example

https://react-bootstrap.netlify.app/docs/components/dropdowns/#menu-alignment

Screenshots

bug_dropdown

Not sure if it's super clear but the jumps occur when the bottom of the menu enters the viewport.

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Chrome, Firefox

What version of React-Bootstrap are you using?

2.8.0

What version of Bootstrap are you using?

5.2.1

Additional context

Note that I can repro the bug on the official doc directly, so it won't be solved by a version update.

Sorry in advance if it's a dupe. Might be related to #5812 but this other issue is not associated with a repro.

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

1 participant