Skip to content

[ContextMenu] Scroll to top when on absolute container #1688

@cabello

Description

@cabello

Bug report

Current Behavior

I have a context menu inside an absolute container, this container is powered by react-window (long virtual lists).

When I use Portal (attach to document.body) it doesn't show up.
When I don't use a portal it shows up for items before scroll but for items that require scrolling down it scrolls to top when I right click and not show the menu.

Expected behavior

Not to scroll to the top and show the menu there.

Reproducible example

CleanShot.2022-09-27.at.07.43.45.mp4

Suggested solution

I suspect this could be popper configuration issue, we have a few poppers given tooltips and menus in our app.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-context-menu 1.0.0
React n/a 17
Browser Chrome 105
Assistive tech
Node n/a 16.14.0
npm/yarn yarn 1.22.19
Operating System macOS 12.6

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