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
No known key found for this signature in database
GPG key ID: 63E31F7B5993A9C4

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 }); this.setState({ visible: !this.state.visible });
}, },