Skip to content

Sticky header not working for simplified headers (o-header) #2050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
petrklus opened this issue Mar 27, 2025 · 0 comments · May be fixed by #2055
Open

Sticky header not working for simplified headers (o-header) #2050

petrklus opened this issue Mar 27, 2025 · 0 comments · May be fixed by #2055

Comments

@petrklus
Copy link

petrklus commented Mar 27, 2025

We are using a simplified version of the o-header and we are experiencing issues with the sticky behaviour.

We have narrowed the issue down to the following line:

const isHeaderExpanded = stickyHeaderContainer.getAttribute('aria-hidden');

As we do not have any element with ID o-header-search-sticky, the stickyHeaderContainer is null and thus stickyHeaderContainer.getAttribute('aria-hidden'); fails.

We have fixed this temporarily by adding an element with said ID into our sticky header markup:

<div id="o-header-search-sticky" style="display: none;"></div>

Which fixes the sticky header initialisation issue.

The issue seems to have been introduced here: 027b716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant