Skip to content

[EuiFlyout] [EuiButtonGroup] Z-Index conflict when a Flyout occludes Toggle Buttons #4122

Closed

Description

@Zacqary

Observed on the Kibana Inventory view:

Screen Shot 2020-10-07 at 2 09 32 PM

Screen Shot 2020-10-07 at 2 09 37 PM

The culprit is:

.euiButtonGroup__toggle[class*="checked"] {
  z-index: 2;
}

Changing this to z-index: 1 fixes the issue.

Activity

  1. thompsongl commented on Oct 7, 2020

    @thompsongl
    Contributor

    Hey @Zacqary

    I'm unable to reproduce this with a simple case: https://codesandbox.io/s/clever-shaw-bct1t
    Just looking at the code, EuiFlyout has a z-index of 3000 by default, so there should be no problem with z-index: 2 overlap.
    Can you provide more info on the layout composition?

  2. cchaos commented on Oct 7, 2020

    @cchaos
    Contributor

    This most likely means that the EuiFlyout is actually placed in the DOM nested somewhere inside a component that is before the button group. I'd recommend either using the Kibana Overlay Service, EuiFlyout's ownFocus prop, or wrapping the EuiFlyout in a EuiPortal to ensure it gets rendered at the end of the DOM structure.

  3. Zacqary commented on Oct 8, 2020

    @Zacqary
    ContributorAuthor

    Thanks @cchaos, looks like our flyout wasn't in a portal. EuiPortal helped.

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