You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
only override contextmenu if closeMenu is provided
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -91,7 +91,7 @@ export default class ContextualMenu extends React.Component {
|
|||||||
onContextMenu(e) {
|
onContextMenu(e) {
|
||||||
if (this.props.closeMenu) {
|
if (this.props.closeMenu) {
|
||||||
this.props.closeMenu();
|
this.props.closeMenu();
|
||||||
}
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const x = e.clientX;
|
const x = e.clientX;
|
||||||
const y = e.clientY;
|
const y = e.clientY;
|
||||||
@@ -106,6 +106,7 @@ export default class ContextualMenu extends React.Component {
|
|||||||
document.elementFromPoint(x, y).dispatchEvent(clickEvent);
|
document.elementFromPoint(x, y).dispatchEvent(clickEvent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const position = {};
|
const position = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user