-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Modal script adds margin-right and padding-right for .sticky-top #27071
Comments
We just add |
Ok I made this CodePen to demonstrate the issue: https://codepen.io/Johann-S/pen/KxKpOR |
Fixed it with this
|
@mdo I'm a bit lost here, I understand the issue, I know how to fix it but I'm not sure what I'll do is the right fix. My fix will not add My fix replace those lines : By: const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT))
.filter((elem) => !elem.classList.contains('container'))
const stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT))
.filter((elem) => !elem.classList.contains('container')) /CC @XhmikosR if you have any ideas, @zalog because you worked on that too |
Now you can see the problem on the site: Pay attention to file "main.css", line 38. |
I too see the issue for sure. @Johann-S's fix seems OK, do we have a PR for this? |
Nope because I'm not sure my fix is correct and won't create side effects |
Why do you even go for margin and padding? FIX: Sticky element will be contained by the parent's width so nothing needs changing here (only when browser doesn't do sticky). |
… + add position-fixed to fixed selector, remove sticky-top from fixed content, and finish by removing all sticky content selector as they're useless see : twbs/bootstrap#27071
any update? |
This is still not fixed so this is my solution:
And the css class
|
@XhmikosR I still have problems even with home solution with this issue. It will be solved on the next release? |
As you can see, the issue is still open and it even has the label Any PRs which might fix this are welcome as usual :) |
I just ran into this problem when migrating from v3 to v4. Looks like it might have been fixed in #30621, but it's still waiting on a fix for a test conflict issue |
Having the same issue. Steps to reproduce in my web app:
UPD. I have fixed my problem applying patch by @muhamadamin1992 1c9f4a4
|
This issue unfortunately persists if you are using offcanvas menu in BS5. |
@rob101 please make a new issue with all the needed info. |
Windows 7
Firefox 61.0.2
Why modal script adds margin-right and padding-right for .sticky-top?
The text was updated successfully, but these errors were encountered: