Skip to content

[Spike] Investigate a feasible programmatic focus detection #9549

@weronikaolejniczak

Description

@weronikaolejniczak

The purpose of this task is to investigate whether we can easily detect if focus was made programmatically (.focus()) or through user interaction (mouse, keyboard).

Context

Current behavior

Focus return triggers unwanted tooltips. Closing a modal or popover returns focus to the trigger, which unconditionally fires the tooltip. When an overlay closes and the browser returns focus to the trigger, the tooltip fires immediately. Disorienting after confirmation modals.

Expected behavior

Focus return does not trigger tooltips. Closing a modal, flyout, or popover does not re-show the tooltip on the trigger element.

Notes

  • For modal, popover, etc. we know what the trigger is and when we are closing these components. How do we return focus to the trigger while communicating not to show the tooltip?

Acceptance criteria

  • The real question is answered: is it really a problem? What cases are these? Do we always want to not show the tooltip on return focus?... That's 3 questions.
  • Both of these are valid conclusions:
    • there's a feasible solution that addressed the problem,
    • the solutions are too complex for the value they offer.
  • (if applicable) Implementation task is created (or [EuiToolTip] Expose a property to allow tooltips to not be shown onFocus #9438 is rephrased)

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions