Skip to content

[Tooltip] Allow to opt out of automatic close on scroll #3504

@viters

Description

@viters

Feature request

Overview

TooltipContent implementation contains code to hide it when the trigger is scrolled: https://github.com/radix-ui/primitives/blob/main/packages/react/tooltip/src/tooltip.tsx#L527. Popper tracks scroll and updates tooltip position. Currently to override this function, you have to completely opt out of radix tooltip controlled state and ignore onClose events.

I think this behavior should be configurable, e.g. with closeOnScroll prop with default true value to keep change compatible with previous versions.

Who does this impact? Who is this for?

I think it can benefit all Tooltip users, and it is really easy code adjustment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions