File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class ReactTooltip extends Component {
44
44
constructor ( props ) {
45
45
super ( props )
46
46
this . state = {
47
- place : 'top ' , // Direction of tooltip
47
+ place : '' , // Direction of tooltip
48
48
type : 'dark' , // Color theme of tooltip
49
49
effect : 'float' , // float or fixed
50
50
show : false ,
@@ -199,8 +199,8 @@ class ReactTooltip extends Component {
199
199
}
200
200
const placeholder = getTipContent ( originTooltip , content , isMultiline )
201
201
202
- // If e is instance of FocusEvent , switch to `solid` effect
203
- const isFocus = e instanceof FocusEvent
202
+ // If it is focus event , switch to `solid` effect
203
+ const isFocus = e instanceof window . FocusEvent
204
204
205
205
this . setState ( {
206
206
placeholder,
@@ -264,7 +264,8 @@ class ReactTooltip extends Component {
264
264
this . clearTimer ( )
265
265
this . delayHideLoop = setTimeout ( ( ) => {
266
266
this . setState ( {
267
- show : false
267
+ show : false ,
268
+ place : ''
268
269
} )
269
270
this . removeScrollListener ( )
270
271
} , parseInt ( delayHide , 10 ) )
You can’t perform that action at this time.
0 commit comments