From 25af5f1cc317996d80f90b2e09e24748078e0cb1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 23 Sep 2018 01:07:51 +0200 Subject: [PATCH] FIX https://github.com/yjose/reactjs-popup/issues/37 --- src/Popup.js | 10 +++++----- stories/src/BoundedTooltip.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Popup.js b/src/Popup.js index 21bf6a8..658a35d 100644 --- a/src/Popup.js +++ b/src/Popup.js @@ -252,6 +252,11 @@ export default class Popup extends React.PureComponent { const overlay = this.state.isOpen && !(on.indexOf("hover") >= 0); const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip; return [ + !!this.props.trigger && ( + + {this.renderTrigger()} + + ), this.state.isOpen && (
), this.state.isOpen && !modal && this.renderContent(), - !!this.props.trigger && ( - - {this.renderTrigger()} - - ) ]; } } diff --git a/stories/src/BoundedTooltip.js b/stories/src/BoundedTooltip.js index 2071c17..3ae2ea1 100644 --- a/stories/src/BoundedTooltip.js +++ b/stories/src/BoundedTooltip.js @@ -19,12 +19,12 @@ export default class BoundedTooltip extends React.Component { position={this.props.position} //open={this.state.open} closeOnDocumentClick - keepTooltipInside={false} + keepTooltipInside={true} // onClose={this.closeModal} > {close => (
- + × remove Lorem ipsum dolor sit amet, consectur adipisicing elit. Beatae magni