Skip to content

Header Stick: Search bar is on top of the navigation overlay #99

Closed

Description

@carolinan

What happened?

When the Header Stick design is used, and the navigation overlay is opened, the search bar from the footer area is visible at the bottom of the navigation overlay. It can be clicked on with the mouse, but it cannot be reached with the keyboard, since the focus is contained within the overlay.

This does not occur with the other header designs, default and collapsed.
My expectation would be for the search bar to not show above the overlay.

Where does it happen?

On the site (front end)

Steps to reproduce

  1. In the Site Editor, edit the header template part and select the design called Header Stick. Save.
  2. View the site on the front. This needs to be tested on a view that has the search bar, so for example NOT the search result page or the 404, but the index works fine for testing.
    Reduce the browser window width so that the main menu in the header shows as the menu button.
  3. Activate that button to open the navigation overlay.
  4. See that the search bar shows when the overlay is open.
  5. Try to interact with the search bar using mouse and keyboard.

Screenshots or screen recording

The opened overlay:
Screenshot of the open navigation overlay, with the search bar showing at the bottom

WordPress version

7.2

PHP version

8.2

Ipsum version

trunk

Gutenberg plugin version

No response

Browser and device

Chrome

Before you submit

  • I searched the existing issues and this bug hasn't been reported yet.

Activity

  1. added
    [Type] Bug
    on Sep 24, 2026
  2. prasadkarmalkar commented on Sep 24, 2026

    @prasadkarmalkar

    I looked into this and found the cause.

    The navigation overlay has z-index: 100000. With the default and collapsed headers, the <header> isn't positioned, so that z-index competes at the page level and the overlay covers the pinned Search Bar.

    With Header Stick, the header wrapper is position: sticky; z-index: 10, which creates a stacking context. The overlay's z-index: 100000 then only applies inside the header; at the page level, the whole header, overlay included, sits at 10. The Search Bar (.sticky-bottom) is also z-index: 10 and comes later in the DOM, so it paints on top of the open overlay.

    The fix is to rank the sticky header one layer above the pinned bar, so the header and everything in it (overlay, submenus) always sits above it. This matches how the other header designs behave:

     header.wp-block-template-part:has(> .is-position-sticky) {
     	position: sticky;
     	inset-block-start: 0;
    -	z-index: 10;
    +	z-index: 11;
     }

    This keeps the change to a single value and doesn't rely on core's overlay class names or z-index values.

    Image

    Let me know if this approach looks good. Happy to open a PR.

  3. added a commit that references this issue on Nov 3, 2026
    17a7ada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions