1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-10 23:54:08 +02:00

prevent quick interactions from misplacing tooltips

This commit is contained in:
Ryan Berliner
2021-03-06 23:57:23 +02:00
committed by XhmikosR
parent d491c29aa0
commit 6ef70b342c
2 changed files with 10 additions and 3 deletions

View File

@@ -283,6 +283,10 @@ class Tooltip extends BaseComponent {
EventHandler.trigger(this._element, this.constructor.Event.INSERTED)
if (this._popper) {
this._popper.destroy()
}
this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))
tip.classList.add(CLASS_NAME_SHOW)
@@ -650,7 +654,7 @@ class Tooltip extends BaseComponent {
if (event) {
context._activeTrigger[
event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER
] = false
] = context._element.contains(event.relatedTarget)
}
if (context._isWithActiveTrigger()) {