website
website copied to clipboard
Context menu click on thumb in `ScrollArea` prevents pointer release
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 |
Hey 👋
Haha! It probably should use our ScrollArea
now that we have one!