Skip to content

[EuiToolTip] Dom cannot be removed #6845

Closed as not planned
Closed as not planned

Description

@ReeseLiu2021

Describe the bug
EuiToolTip Dom cannot be removed

Environment and versions

  • EUI version: "@elastic/eui": "^81.2.0",
  • Browser: Chrome 113.0.5672.126
  • Operating System: MacOs 13.3.1 M1

To Reproduce
9zlANdv9Cp

Expected behavior
When I move the mouse over the tooltip, only one div should be added and this div should be deleted when the mouse is moved out

Additional context

function App() {
    return (
        <div>
            <EuiToolTip content={"1111"}>
                <div>home</div>
            </EuiToolTip>
        </div>
    );
}

Activity

  1. added
    ⚠️ needs validation
    on Jun 15, 2023
  2. breehall commented on Jun 15, 2023

    @breehall
    Contributor

    Hello! By chance, are there additional contents to your app? I put together a small replication of your code with a simple EuiTooltip and I'm not finding the same behavior. When I hover over the tooltip, portal appears and is removed when I remove focus.

    Here's a link to my demo and attached video of the behavior I'm finding.

    Screen.Recording.2023-06-15.at.10.12.56.AM.mov
  3. cee-chen commented on Jun 19, 2023

    @cee-chen
    Contributor

    @breehall it looks like you've linked to an EuiSuperSelect demo instead of a tooltip demo. The docs example works just fine though: https://codesandbox.io/s/zly3k7?file=/demo.js

    @ReeseLiu2021 Can you confirm what bundler you're using (webpack, rollup, Vite, etc.) as well as what version of React you're on? As a heads up EUI does not fully support React 18 yet, and has issues particularly around portals.

  4. added
    answered
    on Jun 26, 2023
  5. cee-chen commented on Jun 26, 2023

    @cee-chen
    Contributor

    Closing this as can't repro - please feel free to comment with a working codesandbox link of the issue.

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

    answered⚠️ needs validation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions