cluk3 / cluk3/use-context-menu
Left clicking on trigger element doesn't hide context menu
- Dominant language
- JavaScript
- Stars
- 36
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
First off: Thanks for this library! 🙂
I think I've found a bug.
- `react-use-context-menu` version: 0.1.4
- `node` version: 14.6.1
- `npm` (or `yarn`) version: 2.4.1
**Expected behaviour**
When the user left clicks on the div that triggered the context menu, the context menu should be hidden.
**Actual behavior**
If the user left clicks the div that triggered the context menu, the context menu is not hidden.
If the user left clicks somewhere else on the page, the context men is hidden.
Example: https://codesandbox.io/s/sad-shaw-yfrqk
In the example, right click the word "context", then left click the word "me". I would expect the context menu to disappear, but it doesn't. If you click anywhere else on the page, the context menu disappears.
Thanks! 🙂
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue using the linked CodeSandbox: open the context menu on “context,” then left-click “me.” Trace the React hook behavior for the trigger element and verify that a left click there hides the menu, while preserving the existing dismissal behavior for clicks elsewhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100