1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-14 19:02:33 +03:00

stop propagation of click events on un-hiding the spoiler

This commit is contained in:
Sorunome
2019-06-11 22:13:47 +02:00
parent eddac4b188
commit d0f78e9d44

View File

@@ -11,7 +11,12 @@ module.exports = React.createClass({
};
},
toggleVisible() {
toggleVisible(e) {
if (!this.state.visible) {
// we are un-blurring, we don't want this click to propagate to potential child pills
e.preventDefault();
e.stopPropagation();
}
this.setState({ visible: !this.state.visible });
},