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
Prevent scrollbar replacement on non-integer width #30772
Conversation
6a27eb3
to
00bbb3e
Compare
js/tests/unit/modal.spec.js
Outdated
// Enable the scrollbar measurer and reset body margin | ||
const css = ` | ||
.modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } | ||
body { margin: 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While not strictly necessary for the test to work, I believe it makes sense to include this style definition here: The values of rect.left
and rect.right
in the _checkScrollbar
method depend on this margin, and when not set explicitly, a browser default will be used (e.g. 8px
in Chrome) instead of the value actually set by Bootstrap.
00bbb3e
to
95ba418
Compare
Thanks @kremerd! I rebased this to include the original patch and authorship, so please don't overwrite it. BTW for the v4-dev backport the test will have to be adapted since we use QUnit there. But that's after this is merged. |
95ba418
to
79553c8
Compare
1d75bf4
to
136df8f
Compare
@kremerd thanks! Now the backport to v4-dev is left. I'll try to do it so that we include the patch in the upcoming v4.4.2, but if you have time feel free to backport it to v4-dev and ping me. |
Fixes #29681, Equals #30017, but also includes a test case.