ScrollSpy root-margin gets disabeled by smoot-scroll set to false
Prerequisites
- [X] I have searched for duplicate or closed issues
- [X] I have validated any HTML to avoid common problems
- [X] I have read the contributing guidelines
Describe the issue
Toggleing the smooth-scroll attribute changes the scroll and highlighting behavior in combination with a custom rootMargin.
In my use case I have a sticky top-nav and a negative rootMargin is set to shrink the view. When I disable smoot-scrolling and use the anchors for scrolling the content is partialy disappering behind the navbar.
The Indication of the active Item is off as well. When I set smooth-scroll to true everything works fine.
Reduced test cases
I tried to replicate the test case here in codepen but the ScrollSpy is somehow bugged in there. It behaves different from my own html file which can be found here as a gist.
This gist works right if smooth-scroll is enabled but if it is turned off the highlighting of an active element and the clickable-scrolling is different than before.
For me it looks like the root-margin is disabled.
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Firefox, Microsoft Edge
What version of Bootstrap are you using?
v5.2.0
I'm seeing this same issue in 5.2.1
Seeing the same behavior in v5.3.5