Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context menu click on thumb in ScrollArea prevents pointer release #446

Open
chaance opened this issue Jul 22, 2022 · 1 comment
Open

Context menu click on thumb in ScrollArea prevents pointer release #446

chaance opened this issue Jul 22, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@chaance
Copy link
Member

chaance commented Jul 22, 2022

Bug report

Current Behavior

If you right-click on the thumb in your ScrollArea and open the context menu, the scrollable area will continue to track the pointer when the menu is dismissed whether or not the pointer has been released.

Expected behavior

The scrollable area stops scrolling when you trigger the context menu.

Reproducible example

The left side navigation on the docs uses the internal ScrollArea. Right click on the thumb then press Escape, or select a menu option that doesn't navigate. In either event you end up stuck with scrolling until you click and release again.

I assumed this was also a bug in Radix and started the issue there, but I realized the website has its own ScrollArea component that doesn't compose Radix. Doesn't seem to be an issue with the examples inside the page.

Suggested solution

Release the thumb when the contextmenu event is fired.

Your environment

Software Name(s) Version
Browser Chrome 103.0.5060.114
Browser Safari 15.4
Assistive tech n/a n/a
Node n/a n/a
npm/yarn n/a n/a
Operating System macOS 12.3.1
@benoitgrelard
Copy link
Contributor

Hey 👋

Haha! It probably should use our ScrollArea now that we have one!

@chaance chaance added bug Something isn't working help wanted Extra attention is needed labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants