Skip to content

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

Open
@petrklus

Description

@petrklus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions