Open IvanPostu opened 3 months ago
cc @OlivierMadant @wuda-io
I know how to implement this. If you agree with the idea, I will start working on it.
Thats a good idea! What is with the starting element? Maybe we should also add keepFirstElementActive too. From my side this is ok 👍
Before submitting...
Context
If the user scrolls the page outside of the
scrollspy
elements, there will be no active element in thesection table-of-contents
. In most cases, this is fine. However, if it's necessary to keep the last active element visible in thesection table-of-contents
, the component doesn't provide a way to do so.Current Behavior
Let's imagine a blog web page with 2 sections:
Main section is wrapped in scrollspy component. When the user scrolls down from the main section through comments, there will be no active element in
section table-of-contents
.Expected behavior
To introduce a flag
keepLastActiveElementVisible
(or any other name, TBD) that allows keeping the element visible insidesection table-of-contents
if scrollbar is outside thescrollspy
elements.Possible Solutions or Causes
To introduce that flag, if the proposal is approved then I can implement it!
Your Environment