File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ var ReactTooltip = (function (_Component) {
155
155
window . removeEventListener ( '__react_tooltip_hide_event' , this . globalHide ) ;
156
156
window . removeEventListener ( '__react_tooltip_rebuild_event' , this . globalRebuild ) ;
157
157
window . removeEventListener ( 'resize' , this . onWindowResize ) ;
158
+ window . clearTimeout ( this . delayShowLoop ) ;
158
159
} ;
159
160
160
161
/* TODO: optimize, bind has been trigger too maany times */
@@ -338,7 +339,7 @@ var ReactTooltip = (function (_Component) {
338
339
var delayShow = _state . delayShow ;
339
340
var show = _state . show ;
340
341
341
- clearTimeout ( this . delayShowLoop ) ;
342
+ window . clearTimeout ( this . delayShowLoop ) ;
342
343
343
344
var delayTime = show ? 0 : parseInt ( delayShow , 10 ) ;
344
345
var eventTarget = e . currentTarget ;
@@ -375,7 +376,7 @@ var ReactTooltip = (function (_Component) {
375
376
376
377
var delayHide = this . state . delayHide ;
377
378
378
- clearTimeout ( this . delayShowLoop ) ;
379
+ window . clearTimeout ( this . delayShowLoop ) ;
379
380
setTimeout ( function ( ) {
380
381
_this3 . setState ( {
381
382
show : false
Original file line number Diff line number Diff line change 45
45
},
46
46
"dependencies" : {
47
47
"classnames" : " ^1.2.0" ,
48
- "react-dom" : " ^ 0.14.0 "
48
+ "react-dom" : " 0.14.* "
49
49
},
50
50
"devDependencies" : {
51
51
"babel" : " ^5.3.1" ,
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export default class ReactTooltip extends Component {
114
114
window . removeEventListener ( '__react_tooltip_hide_event' , this . globalHide )
115
115
window . removeEventListener ( '__react_tooltip_rebuild_event' , this . globalRebuild )
116
116
window . removeEventListener ( 'resize' , this . onWindowResize )
117
+ window . clearTimeout ( this . delayShowLoop )
117
118
}
118
119
119
120
/* TODO: optimize, bind has been trigger too maany times */
@@ -278,7 +279,7 @@ export default class ReactTooltip extends Component {
278
279
*/
279
280
updateTooltip ( e ) {
280
281
const { delayShow, show} = this . state
281
- clearTimeout ( this . delayShowLoop )
282
+ window . clearTimeout ( this . delayShowLoop )
282
283
283
284
const delayTime = show ? 0 : parseInt ( delayShow , 10 )
284
285
const eventTarget = e . currentTarget
@@ -307,7 +308,7 @@ export default class ReactTooltip extends Component {
307
308
*/
308
309
hideTooltip ( ) {
309
310
const { delayHide} = this . state
310
- clearTimeout ( this . delayShowLoop )
311
+ window . clearTimeout ( this . delayShowLoop )
311
312
setTimeout ( ( ) => {
312
313
this . setState ( {
313
314
show : false
You can’t perform that action at this time.
0 commit comments