mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Explain topic click stopPropagation
This commit is contained in:
parent
3468abc975
commit
6f20445a42
1 changed files with 7 additions and 1 deletions
|
@ -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() {
|
render: function() {
|
||||||
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
||||||
|
|
||||||
|
@ -68,7 +74,7 @@ const RoomDetailRow = React.createClass({
|
||||||
<div className="mx_RoomDirectory_name">{ name }</div>
|
<div className="mx_RoomDirectory_name">{ name }</div>
|
||||||
{ perms }
|
{ perms }
|
||||||
<div className="mx_RoomDirectory_topic"
|
<div className="mx_RoomDirectory_topic"
|
||||||
onClick={function(e) { e.stopPropagation(); }}
|
onClick={this.onTopicClick}
|
||||||
dangerouslySetInnerHTML={{ __html: topic }} />
|
dangerouslySetInnerHTML={{ __html: topic }} />
|
||||||
<div className="mx_RoomDirectory_alias">{ getDisplayAliasForRoom(room) }</div>
|
<div className="mx_RoomDirectory_alias">{ getDisplayAliasForRoom(room) }</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue