fkhadra / fkhadra/react-contexify

contextMenu.show doesn't work with onMouseUp Event

Open
#151 2 comments 0 reactions 0 assignees View on GitHub
help wanted reproduciton needed
Dominant language
TypeScript
Stars
1.2k
Forks
132
PR merge metrics
No merged PRs in 30d

Description

If we use contextMenu.show in combination with onMouseUp event the menu doesn't show up.

Example
```
import React from "react";
import { contextMenu, Item, Menu, Separator } from "react-contexify";

const MyComp: React.FC = () => {
const MyAwesomeMenu = () => (

Lorem

Ipsum

);

const showMenu = (e) => {
contextMenu.show({
id: 'id-1',
event: e
});
};

return (
<>


At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.



);
}
```
The event onMouseUp gets fired but the contextMenu doesn't show up. If I use `onClick` instead of `onMouseUp` the context menus is shown. Does anyone knows how to get react-contextify work with an `onMouseUp` event?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.