You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overwrite the function and don't add the class, but I guess it's there for a reason so I think that would just cause me issues down the road.
Update the 'top' property of my header to the window.scrollY value when the modal is opened, and revert it to 0 when it's closed. But I can't find a hook / event to facilitate this properly without some janky position flickering
Curious to see if anyone else has this problem and how they fixed it :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I have come across an issue where my sticky header drops off the page if I open a modal when I am scroll down on my page.
This is my demo page with a sticky header
No issues when I am at the top of my page:
When I open a modal scrolled down a bit:
My HTML:
The cause is in the modal.js file with this function where it sets the 'overflow-y-hidden' class on the body:
I think I have 2 options:
Curious to see if anyone else has this problem and how they fixed it :)
Beta Was this translation helpful? Give feedback.
All reactions