Skip to content

Workaround for Chromium CSS mask-image bug breaks positioning for nested position:fixed content #8269

Closed as not planned

Description

@mgadewoll

Description

We introduced a fix (PR) for a Chromium bug around the CSS property mask-image which does not create expected stacking context correctly.
We noticed that this fix breaks the positioning of content with position:fixed inside of elements that also have position:fixed applied (e.g EuiFlyout or EuiModal).

ℹ It was reported that this applies for the ES|QL suggestion popover of the Monaco editor used across Kibana.

unexpected

suggestion popover is positioning outside of the visible content

Image

example with removed position:fixed on the flyout to showcase wrong positioning

Image

expected

Image

As mentioned in the previous PR there are other CSS properties that also work to force the stacking context of which position:relative seems to work for the current case at hand. But it will require testing for possible use cases across components that make use of the euiYScrollWithShadows or euiXScrollWithShadows to ensure it does not break something else as position:relative will have an effect on nested children with e.g. position:absolute.

Activity

  1. mgadewoll commented on Apr 3, 2025

    @mgadewoll
    ContributorAuthor

    Instead of adding position:relative we might currently rather keep using the consumer-side override for the cases that need it.

    The reasoning here is that:

    • position: relative might have more unexpected effects across Kibana considering flyouts and modals are used extensively in any kind of combination with custom content we don't have awareness of
    • The specific use case that resulted in the positioning issue on Kibana side is currently specific to the use of the 3rd-party monaco editor on Kibana side. While it's a very scoped issue to that specific usage, adding the override on consumer side is more appropriate.
    • Looking at the EUI components alone that might have an expected position: fixed there should currently not be a combination that results in nested fixed positioned content.
    • In a custom test on EUI side (using the non-exposed portal API for datepicker in EuiDatePicker) I noticed that position: relative actually did not solve the positioning issue as expected while translateZ(0) did. That means it might not be a valid solution in 100% of the cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions