Jul 10 2020 06:06 AM - edited Jul 10 2020 06:06 AM
Hi,
I currently have a site set up and I'm using the hub feature to keep a consistant menu across the site. One of our users asked me why the menu keeps disappearing and I noticed that when you scroll down the page, the menu colapses (apparently to give the user more of a reading view style).
After some research, I found out about the shy menu feature being added to modern sites and wondered if there was a way to turn this off. The space saved vs losing the menu entirely when scrolling is not worth it at all for the users of the site and they are becoming frustrated that they have to scroll to the top of the page to see the menu again.
I've looked through the options in the change the look section and can't find any settings to change this behaviour. Any help would be much appreciated.
Thanks,
Tom
Jul 10 2020 09:59 AM
It looks to me that at the moment there is no means to control this feature. It appeared on my site pages and thus far an exploration of Site Settings and some Googling has not yielded any results. I'm sure this will be much requested however.
Jul 13 2020 01:35 PM
Nov 16 2021 05:36 PM
Mar 14 2024 06:09 AM - edited Mar 14 2024 06:10 AM
Avail, here is ur 2024 code... to disable the header, and the flickering.
<script>
// disable flickering after hiding the header & shy header
window['__shyConductor']._totalHeightDifference = 0;
</script>
<style>
#spSiteHeader /* disable shy & page header bar */ {
display: none !important;
}
/* optional cleanup */
#sp-appBar, /* disable left nav bar */
#spCommandBar, /* disable command bar */
[data-automation-id=pageHeader] /* disable title bar */
{
display: none !important;
}
</style>
The _shyConductor is object that contains all functions for the shy header inside Microsoft Sharepoint Page. By setting heightDifference to 0, we are just quickly ignoring any change to update the scrollTop. You could use any other function of shyHeader instance to disable that as well, but I found this the simplest trick in the book.
Helped? Follow me on https://github.com/elkolorado
Apr 10 2024 08:56 AM