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

Right aligned dropdowns have wrong width on Bootstrap 4.1 #962

Closed
cauethenorio opened this issue Apr 17, 2018 · 1 comment
Closed

Right aligned dropdowns have wrong width on Bootstrap 4.1 #962

cauethenorio opened this issue Apr 17, 2018 · 1 comment

Comments

@cauethenorio
Copy link

Since version 4.1, bootstrap added some CSS rules which relies on x-position attribute added by popper.js to properly size the dropdown menu node:

twbs/bootstrap#25400
https://github.com/twbs/bootstrap/pull/25400/files#diff-17c7180c6905243675dbb731bacf389aR90

But since version 0.8.1, react-popper doesn't set the x-position attribute on the menu node:

floating-ui/react-popper@4338327

So when using right-aligned dropdown menus with reactstrap the menu node is set with left:0 and right:0 resulting in a wrong width, since there's no x-position to add the right: auto rule.

The error can be reproduced on the right aligned dropdown reactstrap doc page if you add a dropdown item with a longer content:

image

Not sure how it can be fixed. Maybe updating reactstrap to add the x-position manually?

@TheSharpieOne
Copy link
Member

TheSharpieOne commented Apr 17, 2018

We'll have to fix this in reactstrap as the next version of react-popper (currently in beta) changes drastically and we would have to apply that attribute in that version anyways so pushing this issue upstream doesn't get us very far.

TheSharpieOne added a commit that referenced this issue Apr 18, 2018
react-popper no longer adds the attribute and it is needed for bootstrap 4.1.0

Fixes #962
TheSharpieOne added a commit that referenced this issue Apr 18, 2018
react-popper no longer adds the attribute and it is needed for bootstrap 4.1.0

Fixes #962
TheSharpieOne added a commit that referenced this issue Apr 18, 2018
react-popper no longer adds the attribute and it is needed for bootstrap 4.1.0

Fixes #962
TheSharpieOne added a commit that referenced this issue Apr 18, 2018
react-popper no longer adds the attribute and it is needed for bootstrap 4.1.0

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

No branches or pull requests

2 participants