Skip to content

[popover] Prevent dismissal when a user moves the cursor back over the floating element #2272

Open
@oleksandr-danylchenko

Description

@oleksandr-danylchenko

Relations

Feature request

  1. Allow dismissal prevention when a user moves the cursor back over the floating element.
  2. Allow configuring the outsidePressEvent for the underlying @floating-ui library. Currently, the Popover components is getting immediately dismissed once a user puts their pointer down.

Summary

The popover should close on mouseUp, and if a user drags back over the popover's content before releasing the mouse button, that should cancel the action.

Motivation

In order to meet Success Criterion 2.5.2 Pointer Cancellation, we need to adjust the way we handle mouse events for the following elements, because they close on mouseDown when users click outside of them. The popover closes on mouseDown instead of mouseUp. Instead, it should close on full tap or click or on mouse up, and the action should not happen if they mouse down, but then move the cursor back over the popup.

Mouse users with mobility impairments (or anyone who taps their screen in the wrong place) have no way to cancel the action.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions