From 6f20445a426af67a00e596a7d9d4794cafc82694 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 13 Oct 2017 17:57:28 +0100 Subject: [PATCH] Explain topic click stopPropagation --- src/components/views/rooms/RoomDetailList.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomDetailList.js b/src/components/views/rooms/RoomDetailList.js index 0ab2ebd2ce..370bf1bb2d 100644 --- a/src/components/views/rooms/RoomDetailList.js +++ b/src/components/views/rooms/RoomDetailList.js @@ -37,6 +37,12 @@ const RoomDetailRow = React.createClass({ }); }, + onTopicClick: function(ev) { + // When clicking a link in the topic, prevent the event being propagated + // to `onClick`. + ev.stopPropagation(); + }, + render: function() { const BaseAvatar = sdk.getComponent('avatars.BaseAvatar'); @@ -68,7 +74,7 @@ const RoomDetailRow = React.createClass({
{ name }
  { perms }
{ getDisplayAliasForRoom(room) }