Revamp Scrollspy using Intersection observer#33421
Conversation
9d2bf55 to
f72963e
Compare
f72963e to
cc02ab0
Compare
cc02ab0 to
f397a43
Compare
f397a43 to
d3fb671
Compare
d3fb671 to
668d429
Compare
48395cf to
27bef39
Compare
|
After three months, I think, I have something to show 😃 |
|
It seems there's some funky thing going on in https://deploy-preview-33421--twbs-bootstrap.netlify.app/docs/5.0/components/scrollspy/#example-with-nested-nav item 3.1: if I scroll to 3.2 and then back up, 3.1 isn't highlighted. It might need some tweaking with the stepping or whatever it's called :) Also, not sure what the TODO means? If the PR isn't ready yet, let's mark it as draft. |
|
Unfortunately it is the same problem as now. Two visible elements in wrapper. Only the upper can be highlighted. |
27bef39 to
a0a8d25
Compare
ffoodd
left a comment
There was a problem hiding this comment.
On the feature side, it does not highlight exactly at the same moment than our previous version, but this one feels more natural to me.
Regarding the nested items talked about previously, I can confirm it already does the same in our current release and even worse: this PR does highlight the 3-1 item very quickly, what our current release doesn't do.
Si I'd go for it :)
a0a8d25 to
c8a55dc
Compare
e110cda to
3088f04
Compare
b1d4652 to
561d11d
Compare
561d11d to
c538d0c
Compare
85d6504 to
14a00a8
Compare
aa6cd6b to
f2e4cf7
Compare
…tivate target when wrapper is not visible
1f09535 to
5662ac4
Compare
Based on #33015.
Seems operational on the preview scrollspy page.
Needs:
Advantages:
bodyinitialization, event was emitting towindowDisadvantages:
methodoption is ignored nowcloses #35727
closes #33943
closes #28638
closes #35796
closes #28807
may fix #35628