Skip to content

Commit

Permalink
Merge pull request #189 from DevinXian/master
Browse files Browse the repository at this point in the history
fix outside click closing bug for PortalWithState
  • Loading branch information
tajo authored Dec 17, 2017
2 parents 3e61fef + 2831fa5 commit 2bc16c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PortalWithState.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PortalWithState extends React.Component {
if (!this.state.active) {
return;
}
const root = this.portalNode.defaultNode;
const root = this.portalNode.props.node || this.protalNode.defaultNode;
if (!root || root.contains(e.target) || (e.button && e.button !== 0)) {
return;
}
Expand Down

0 comments on commit 2bc16c7

Please sign in to comment.