File tree 1 file changed +8
-16
lines changed
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,6 @@ class Tooltip extends BaseComponent {
172
172
173
173
EventHandler . off ( this . _element . closest ( SELECTOR_MODAL ) , EVENT_MODAL_HIDE , this . _hideModalHandler )
174
174
175
- if ( this . tip ) {
176
- this . tip . remove ( )
177
- }
178
-
179
175
if ( this . _element . getAttribute ( 'data-bs-original-title' ) ) {
180
176
this . _element . setAttribute ( 'title' , this . _element . getAttribute ( 'data-bs-original-title' ) )
181
177
}
@@ -202,10 +198,7 @@ class Tooltip extends BaseComponent {
202
198
}
203
199
204
200
// todo v6 remove this OR make it optional
205
- if ( this . tip ) {
206
- this . tip . remove ( )
207
- this . tip = null
208
- }
201
+ this . _disposePopper ( )
209
202
210
203
const tip = this . _getTipElement ( )
211
204
@@ -218,11 +211,7 @@ class Tooltip extends BaseComponent {
218
211
EventHandler . trigger ( this . _element , this . constructor . eventName ( EVENT_INSERTED ) )
219
212
}
220
213
221
- if ( this . _popper ) {
222
- this . _popper . update ( )
223
- } else {
224
- this . _popper = this . _createPopper ( tip )
225
- }
214
+ this . _popper = this . _createPopper ( tip )
226
215
227
216
tip . classList . add ( CLASS_NAME_SHOW )
228
217
@@ -281,13 +270,11 @@ class Tooltip extends BaseComponent {
281
270
}
282
271
283
272
if ( ! this . _isHovered ) {
284
- tip . remove ( )
273
+ this . _disposePopper ( )
285
274
}
286
275
287
276
this . _element . removeAttribute ( 'aria-describedby' )
288
277
EventHandler . trigger ( this . _element , this . constructor . eventName ( EVENT_HIDDEN ) )
289
-
290
- this . _disposePopper ( )
291
278
}
292
279
293
280
this . _queueCallback ( complete , this . tip , this . _isAnimated ( ) )
@@ -612,6 +599,11 @@ class Tooltip extends BaseComponent {
612
599
this . _popper . destroy ( )
613
600
this . _popper = null
614
601
}
602
+
603
+ if ( this . tip ) {
604
+ this . tip . remove ( )
605
+ this . tip = null
606
+ }
615
607
}
616
608
617
609
// Static
You can’t perform that action at this time.
0 commit comments