File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ var ReactTooltip = (function (_Component) {
6464
6565 _Component . call ( this , props ) ;
6666 this . _bind ( 'showTooltip' , 'updateTooltip' , 'hideTooltip' ) ;
67+ this . mount = true ;
6768 this . state = {
6869 show : false ,
6970 multilineCount : 0 ,
@@ -90,16 +91,21 @@ var ReactTooltip = (function (_Component) {
9091 **/
9192
9293 ReactTooltip . prototype . globalHide = function globalHide ( ) {
93- this . hideTooltip ( ) ;
94+ if ( this . mount ) {
95+ this . hideTooltip ( ) ;
96+ }
9497 } ;
9598
9699 ReactTooltip . prototype . globalRebuild = function globalRebuild ( ) {
97- this . unbindListener ( ) ;
98- this . bindListener ( ) ;
100+ if ( this . mount ) {
101+ this . unbindListener ( ) ;
102+ this . bindListener ( ) ;
103+ }
99104 } ;
100105
101106 ReactTooltip . prototype . componentWillUnmount = function componentWillUnmount ( ) {
102107 this . unbindListener ( ) ;
108+ this . mount = false ;
103109 var tag = document . querySelector ( 'style[id="react-tooltip"]' ) ;
104110 document . getElementsByTagName ( 'head' ) [ 0 ] . removeChild ( tag ) ;
105111 window . removeEventListener ( '__react_tooltip_hide_event' , this . globalHide ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-tooltip" ,
3- "version" : " 0.6.1 " ,
3+ "version" : " 0.6.2 " ,
44 "description" : " react tooltip component" ,
55 "main" : " dist/react-tooltip.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments