Disable context menu on space invite tiles as no options sensibly work

pull/21833/head
Michael Telatynski 2021-04-22 11:24:52 +01:00
parent 7efd4a43a5
commit a51aeaa04d
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,7 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
}
private onContextMenu = (ev: React.MouseEvent) => {
if (this.props.space.getMyMembership() !== "join") return;
ev.preventDefault();
ev.stopPropagation();
this.setState({
@ -187,6 +188,8 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
};
private renderContextMenu(): React.ReactElement {
if (this.props.space.getMyMembership() !== "join") return null;
let contextMenu = null;
if (this.state.contextMenuPosition) {
const userId = this.context.getUserId();