Skip to content

[EuiTooltip] Add an "alwaysVisible" prop #5013

Closed

Description

@loixlab

In elastic/kibana#107292 @cchaos suggested to use a tooltip to give instruction on how to interact with the keyboard on a component. This works well except that, when the tooltip is shown if we mouse out it disappears.

I suggest that we add a new alwaysVisible optional prop to the <EuiToltip /> component which will always display the tooltip and not react to mouse events. The consumer would then be responsible to hide it if needed.

Activity

  1. cchaos commented on Aug 10, 2021

    @cchaos
    Contributor

    For some clarification for whoever picks this up, the tooltip would be always visible only when the wrapped element is in :focus.

  2. hardikhere commented on Aug 11, 2021

    @hardikhere

    Can I pick this up? May be we can also add prop like disapearAfter={some value in milisec} what do you think
    ?

  3. cchaos commented on Aug 11, 2021

    @cchaos
    Contributor

    So I've been thinking about solutions to this issue, remembering there was a "resolved" issue around closing tooltips on every mouse out/move, even when focused (#2560 & #3335). Looking at that specific issue, it seems the behavior being circumvented was when there were two or more elements in close proximity with tooltips and one is focused. I feel like most recently I've been more frustrated with tooltips closing when I don't want them to and seen less tooltips this close together.

    @chandlerprall Since you were the one who originally opened the issue, was there more than just the overlapping tooltip issue?

    My inclination, honestly, is just to revert #3335 or at least remove the mouse out/move listener when the element is focused.

  4. chandlerprall commented on Aug 16, 2021

    @chandlerprall
    Contributor

    @cchaos it was only the fact that two tooltips were being displayed at the same time. I'm okay with reverting #3335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions