Skip to content

Popover in fixed header scrolls with the body #3924

Closed

Description

@damianszocik

Popover (like AppMenu or UserMenu) located in a fixed Header component isn't properly anchored. It scrolls with the document body. I've prepared a reproduction codesandbox, which is a slightly modified code from the docs. To reproduce the issue please open the user menu and then scroll the document.

https://codesandbox.io/s/eui-popover-in-fixed-header-mlwy3

image

Activity

  1. chandlerprall commented on Aug 17, 2020

    @chandlerprall
    Contributor

    EuiPopover has a repositionOnScroll prop that you can set which will re-compute the popover's position when the window's scroll event fires. I tested it on the sandbox you shared (thank you for including one!) to verify it works as expected in your setup.

  2. damianszocik commented on Aug 18, 2020

    @damianszocik
    Author

    I haven't noticed the prop in the docs, my bad. Of course, adding it solves the issue, Thanks a lot @chandlerprall !

  3. ince01 commented on Oct 20, 2020

    @ince01

    Elastic UI Framework - Data grid styling and control

    How to fix this issue? I tried adding repositionOnScroll prop but it still does not work properly

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions