What is the reason for the special treatment of fixed-*
and sticky-*
elements when the scrollbar disappears during modal.show
?
#41131
Unanswered
tesar-tech
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using a modal, the scrollbar is removed from the body, and padding is added to compensate for the scrollbar width, ensuring the layout remains consistent. This functionality is handled by Bootstrap's
scrollbar.js
.However, there is also special treatment for elements with
sticky
orfixed
classes. I’m trying to understand why this is necessary, as everything seems properly aligned with just the padding on the body.I can’t identify a layout scenario where this special treatment would be required to prevent alignment issues.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions