File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ class Tooltip extends BaseComponent {
111111 // Private
112112 this . _isEnabled = true
113113 this . _timeout = 0
114- this . _isHovered = false
114+ this . _isHovered = null
115115 this . _activeTrigger = { }
116116 this . _popper = null
117117 this . _templateFactory = null
@@ -246,14 +246,13 @@ class Tooltip extends BaseComponent {
246246 }
247247
248248 const complete = ( ) => {
249- const previousHoverState = this . _isHovered
250-
251- this . _isHovered = false
252249 EventHandler . trigger ( this . _element , this . constructor . eventName ( EVENT_SHOWN ) )
253250
254- if ( previousHoverState ) {
251+ if ( this . _isHovered === false ) {
255252 this . _leave ( )
256253 }
254+
255+ this . _isHovered = false
257256 }
258257
259258 this . _queueCallback ( complete , this . tip , this . _isAnimated ( ) )
@@ -283,7 +282,7 @@ class Tooltip extends BaseComponent {
283282 this . _activeTrigger [ TRIGGER_CLICK ] = false
284283 this . _activeTrigger [ TRIGGER_FOCUS ] = false
285284 this . _activeTrigger [ TRIGGER_HOVER ] = false
286- this . _isHovered = false
285+ this . _isHovered = null // it is a trick to support manual triggering
287286
288287 const complete = ( ) => {
289288 if ( this . _isWithActiveTrigger ( ) ) {
You can’t perform that action at this time.
0 commit comments