Fix clicking on copy link to thread wrongly opening thread (#8038)

pull/21833/head
Michael Telatynski 2022-03-11 17:13:23 +00:00 committed by GitHub
parent 4a36f9b470
commit 5262d5c315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -656,6 +656,8 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
};
private copyLinkToThread = async (evt: ButtonEvent): Promise<void> => {
evt.preventDefault();
evt.stopPropagation();
const { permalinkCreator, mxEvent } = this.props;
const matrixToUrl = permalinkCreator.forEvent(mxEvent.getId());
await copyPlaintext(matrixToUrl);