mirror of https://github.com/vector-im/riot-web
Disable context menu on space invite tiles as no options sensibly work
parent
7efd4a43a5
commit
a51aeaa04d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue