mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
Disable context menu on space invite tiles as no options sensibly work
This commit is contained in:
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
Block a user