[context menu] Ignore context menu mouseup on non-Mac platforms#3944
[context menu] Ignore context menu mouseup on non-Mac platforms#3944atomiks merged 5 commits intomui:masterfrom
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile OverviewGreptile SummaryThis PR changes context-menu item mouseup handling to ignore right-click The behavioral change lives in the shared menu-item hook ( Confidence Score: 4/5
Important Files Changed
|
| import { createRenderer, isJSDOM } from '#test-utils'; | ||
| import { REASONS } from '../../utils/reasons'; | ||
|
|
||
| vi.mock('@base-ui/utils/detectBrowser', async () => { |
There was a problem hiding this comment.
Let's add a test for non-Mac environment, just to be safe.
LukasTy
left a comment
There was a problem hiding this comment.
LGTM. 👍
Maybe @flaviendelangle could check the behavior on Linux?
If this is the bug, then I can't reproduce it on |
Thank you for checking. 🙏 |
Fixes #3595
On Mac, context menus open on mousedown so they support the down -> move -> release up pattern for selection. On Windows it opens on mouseup, so that's irrelevant. I don't know about Linux, but I've just made it match Windows for simplicity.