Header scrollbar flickering

Hi I have a problem in this whoole site https://www.lakecomoinstitute.com/prodotto/webinar-perio-parodontologia-invernizzi/
that looks like this:
after 4 scroll-down the scrollbar start flickering and goes crazy up/down very quickly while the page is stopped (not mooving up and down like scrollbar). Inspecting I see that the main-header layout-logo-menu “goes from” display: none “to” display: block "in loop.

It is certainly associated with the menu because by eliminating that part of the code the problem of flickering disappears.

On the homepage the problem is slightly different: instead of flikering up/down it makes a jump only once to scroll downwards and vice versa scrolling upwards it makes a jump upwards, try to believe

Has anyone ever had similar experiences and can you help me solve this problem?

Hi, on a quick review using dev tools I find that at a certain scroll point, the header tag with class name “main-header” has a style attribute switching back and forth from display: none to display: block. This can be seen by inspecting the element while the scroll bar is flickering. I can edit as HTML and remove one of the classes and this prevents the issue, but changes the nav element.

My guess is that it is a javaScript issue, possibly to do will scrolling.

Just a quick review because there is a lot of js files included on this page.

On line 1518 there is a script tag containing some jQuery to do with scrolling and show or hide the header element by class .main-header.layout-logo-menu

I would look here for a solution.

Might be something like: at a certain scroll position, hide an element, now the page is not at the right scroll position to hide so it is set to show which changes to height of the page. This go round and round until you scroll further.