From cb18a48d5013c3cde543acef2b4fe6704b0d4656 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 24 Feb 2020 17:29:07 +1100 Subject: [PATCH] fix event propogation on links in messages --- ts/components/conversation/Linkify.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/components/conversation/Linkify.tsx b/ts/components/conversation/Linkify.tsx index 37313d478..558bad7ff 100644 --- a/ts/components/conversation/Linkify.tsx +++ b/ts/components/conversation/Linkify.tsx @@ -67,7 +67,7 @@ export class Linkify extends React.Component { !HAS_AT.test(url) ) { results.push( - + {originalText} ); @@ -85,4 +85,10 @@ export class Linkify extends React.Component { return results; } + + // disable click on elements so clicking a message containing a link doesn't + // select the message.The link will still be opened in the browser. + public handleClick = (e: any) => { + e.stopPropagation(); + }; }