From e9a785245681f37c39c3ba90fe4522a471d41d0b Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sun, 5 Jun 2022 21:00:20 -0700 Subject: [PATCH] allow clickign outside of minidialogs --- src/ui/components/MiniDialog.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/components/MiniDialog.tsx b/src/ui/components/MiniDialog.tsx index a6881f5..36b9e4d 100644 --- a/src/ui/components/MiniDialog.tsx +++ b/src/ui/components/MiniDialog.tsx @@ -15,6 +15,14 @@ export default class MiniDialog extends React.Component { super(props) } + componentDidMount() { + document.addEventListener('mousedown', this.props.closeFn) + } + + componentWillUnmount() { + document.removeEventListener('mousedown', this.props.closeFn) + } + render() { return (