mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +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)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.addEventListener('mousedown', this.props.closeFn)
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.removeEventListener('mousedown', this.props.closeFn)
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="MiniDialog">
|
||||
|
||||
Reference in New Issue
Block a user