Jan 23 2023 06:27 AM
Using a search engine on the world-spanning computer network "The Internet", it seems this questions has popped up now and then without ever getting an answer from Microsoft. Is it so? It really is killing UX that the top navigation disappears when scrolling. If I could wish, a simple toggle for this would be great! Thanks!
Mar 06 2023 12:45 PM
Mar 06 2023 12:48 PM
Mar 07 2023 07:56 AM
To follow up on this, I did some proper testing this morning. Using my previous solution I had some issues with the mega menus acting weird from forcing all of the div's with "root-*" in it to display.
I noticed that when you scroll down it replaces the div class with a different which has a display: none attribute associated with it. When you scroll back up it replaces the class name back to the original and shows the div again.
I found a solution that is working better this morning. Use an SPFx extension to reference an external CSS and JS file.
In your JS file add document ready function, or a windows onload function and add this code: