mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
allow clickign outside of minidialogs
This commit is contained in:
@@ -15,6 +15,14 @@ export default class MiniDialog extends React.Component<IProps, never> {
|
|||||||
super(props)
|
super(props)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
document.addEventListener('mousedown', this.props.closeFn)
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
document.removeEventListener('mousedown', this.props.closeFn)
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="MiniDialog">
|
<div className="MiniDialog">
|
||||||
|
|||||||
Reference in New Issue
Block a user