Skip to content

[EuiInputPopover] In fixed container (like flyout) has positioning issues #1023

Closed

Description

@snide

We'll want to get this fixed before FF. cc @bmcconaghy so he's aware we're on it.

Activity

  1. cchaos commented on Jul 18, 2018

    @cchaos
    Contributor

    It will probably be fixed if they then use the container prop created in #966

  2. chandlerprall commented on Jul 18, 2018

    @chandlerprall
    Contributor

    Shouldn't need the container prop, as it tries to always fit the content within the window bounds - which also means adding a container shouldn't effect anything.

  3. chandlerprall commented on Jul 18, 2018

    @chandlerprall
    Contributor

    This is likely to be fixed by the popover watching for dynamic content in #966, will be merged soon.

  4. chandlerprall commented on Jul 18, 2018

    @chandlerprall
    Contributor

    Dave verified this is resolved in the latest EUI version.

  5. reopened this on Nov 18, 2018
  6. nreese commented on Nov 18, 2018

    @nreese
    Contributor

    I am seeing this issue in the latest Kibana and EUI 5.0.0.

    The color picker positioning is messed up in a flyout. To reproduce, put a color picker in a flyout. Scroll the flyout before opening the color picker. Open the color picker. Notice that it opens at the old location of the anchor and not the new location.

    screen shot 2018-11-18 at 1 42 15 pm

    Also, the EuiComboBox menu does not stay with the input when scrolled in a flyout

    screen shot 2018-11-18 at 1 45 24 pm

  7. cchaos commented on Nov 19, 2018

    @cchaos
    Contributor

    We should look into the combo box (and probably check the super select too), but the color picker will never work until we re-write the component to use our own popovers. Right now it's just using an absolutely positioned "pop up" and not our portalled popover since it's using an external library.

  8. chandlerprall commented on Nov 19, 2018

    @chandlerprall
    Contributor

    For reference, #856 is the WIP custom color picker PR

  9. removed their assignment
    on Oct 28, 2019
  10. cjcenizal commented on Dec 8, 2019

    @cjcenizal
    Contributor

    Here's how it looks with combo-boxes in flyouts when the underlying page is scrolled (EUI 16.0.0):

    scrolling_fixed_popover

  11. cchaos commented on Mar 16, 2020

    @cchaos
    Contributor

    The above example is not an EuiComboBox but an EuiSuperSelect. EuiComboBoxes are fixed by auto-closing on scroll. Likely we'll want to do the same for EuiSuperSelect.

  12. Tocknicsu commented on Jul 27, 2020

    @Tocknicsu
    Contributor

    Hello there.

    I created a minimum app. https://codesandbox.io/s/tvrux and https://tvrux.csb.app/ is preview page.
    Please go to preview page, then click the fullscreen and try those button.

    The app has two sections. Each section has two button, one is eui and another is react-bootstrap.
    First section is using window scroll and second section is using div scroll.

    And all the situation are expected as this comment mentions #1563 (comment)

    The popover also does stick to the input if the input is in the normal DOM and the window scrolls. However it does not stick to the input if the input is in a fixed-position element or an element that scrolls independently of the window scroll.

    In my app, the functionality of fullscreen is needed. But, window cannot be scroll in fullscreen mode. Therefore, I need to set overflow: auto to body to make body can be scroll. And in this situation, all the eui popover position (including initial position after click) is weird when scroll position of body is not 0, but react-bootstrap popover looks fine.

    react-bootstrap using popper library (https://popper.js.org/), and this library has react version (https://popper.js.org/react-popper).

    I also trace both library. eui only calc window at https://github.com/elastic/eui/blob/master/src/services/popover/popover_positioning.ts#L228.
    popper deal with all parents recursively https://github.com/popperjs/popper-core/blob/master/src/index.js#L89 and https://github.com/popperjs/popper-core/blob/master/src/dom-utils/listScrollParents.js

    Finally, I wonder that would you think about using popper library or improve to support recursively calculate parents.

  13. changed the title [-]Popover in fixed container (like flyout) has positioning issues[/-] [+][EuiInputPopover] In fixed container (like flyout) has positioning issues[/+] on Sep 19, 2020
  14. chandlerprall commented on Aug 26, 2021

    @chandlerprall
    Contributor
  15. self-assigned this
    on Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions