Hi,
I decided to make the `activityStreamToolbar` stick to the top when scrolling through the activity stream. I added the following CSS:
.activityStreamToolbar {
position: sticky !important;
top: 0px;
z-index: 99;
}
However, when I select a filter, the stream filters the content and remains displayed at the position where it was at the moment of selection (for example, in the middle of the activity stream page).
To fix this, I created a new *CB Auto Actions*:
Triggers: `onBeforeCompileHead`
Action - Method:** `JavaScript (Inline)`
Action - Code:
document.addEventListener("click",e=>{e.target.closest(".activityFilter,.streamFiltersClear,.streamFiltersClearIcon,.streamFiltersSearchButton")&&setTimeout(()=>window.scrollTo({top:0,behavior:"smooth"}),300)});
Everything works well. After selecting a filter, the stream updates and automatically scrolls back to the top.
Do you think this is the correct way to implement this? Could you possibly add this functionality to the activity stream settings in a future update?