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

This commit is contained in:
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

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);