diff options
| author | Ryan Berliner <[email protected]> | 2021-03-06 23:57:23 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2021-03-16 07:48:50 +0200 |
| commit | 6ef70b342c27445685715f51cfcafb719356870f (patch) | |
| tree | cf56686a8ce25fe3b5f879256ea3b49326506192 /js/src | |
| parent | d491c29aa005177ef148c40d4b7b0a3decc7edef (diff) | |
| download | bootstrap-6ef70b342c27445685715f51cfcafb719356870f.tar.xz bootstrap-6ef70b342c27445685715f51cfcafb719356870f.zip | |
prevent quick interactions from misplacing tooltips
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/tooltip.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index e9f9bfff1..857f72c8a 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -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()) { |
