Avoid double dialog after clicking to remove a public room (#7604)

Fixes https://github.com/vector-im/element-web/issues/20681
This commit is contained in:
Charlie Calendre 2022-01-24 21:20:53 +01:00 committed by GitHub
parent 777af0cf10
commit 6ac3a92513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -611,21 +611,14 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
onMouseDown={(ev) => this.onRoomClicked(room, ev)} onMouseDown={(ev) => this.onRoomClicked(room, ev)}
className="mx_RoomDirectory_roomDescription" className="mx_RoomDirectory_roomDescription"
> >
<div <div className="mx_RoomDirectory_name">
className="mx_RoomDirectory_name"
onMouseDown={(ev) => this.onRoomClicked(room, ev)}
>
{ name } { name }
</div>&nbsp; </div>&nbsp;
<div <div
className="mx_RoomDirectory_topic" className="mx_RoomDirectory_topic"
onMouseDown={(ev) => this.onRoomClicked(room, ev)}
dangerouslySetInnerHTML={{ __html: topic }} dangerouslySetInnerHTML={{ __html: topic }}
/> />
<div <div className="mx_RoomDirectory_alias">
className="mx_RoomDirectory_alias"
onMouseDown={(ev) => this.onRoomClicked(room, ev)}
>
{ getDisplayAliasForRoom(room) } { getDisplayAliasForRoom(room) }
</div> </div>
</div> </div>
@ -637,7 +630,6 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
</div> </div>
<div <div
onMouseDown={(ev) => this.onRoomClicked(room, ev)} onMouseDown={(ev) => this.onRoomClicked(room, ev)}
// cancel onMouseDown otherwise shift-clicking highlights text
className="mx_RoomDirectory_preview" className="mx_RoomDirectory_preview"
> >
{ previewButton } { previewButton }