From d21982cee4e37b3c4097f740e1d168910566993c Mon Sep 17 00:00:00 2001 From: sebastiancbvz Date: Tue, 3 May 2016 10:56:45 +0200 Subject: [PATCH] Fix bug re-open when the component has an outside click listener and someone click in the wrapper button (to close it) --- lib/portal.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/portal.js b/lib/portal.js index c210f0a..bf528b6 100644 --- a/lib/portal.js +++ b/lib/portal.js @@ -98,6 +98,10 @@ export default class Portal extends React.Component { handleWrapperClick(e) { e.preventDefault(); e.stopPropagation(); + + // when having outside mouse click listener don't open portal if it's already open + if (this.state.active) { return; } + this.openPortal(); }