Skip to content

Commit

Permalink
Merge pull request #259 from lsert/dev-dragon-ui
Browse files Browse the repository at this point in the history
fix: not trigger hidePop and rerender when click document and visible…
  • Loading branch information
JeromeLin committed Dec 18, 2020
2 parents 582aa5b + 1c4923e commit 4b1cd15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/popover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class Popover extends Component<PropsType, any> {
}

onDocumentClick = (e: MouseEvent) => {
if (!this.instance || !this.pop) {
const { visible } = this.state;
if (!this.instance || !this.pop || !visible) {
return;
}
if (e.target) {
Expand Down

0 comments on commit 4b1cd15

Please sign in to comment.