From: Ryan Berliner Date: Sun, 7 Mar 2021 13:28:41 +0000 (-0500) Subject: reuse existing popper on show during tooltip fadeout X-Git-Tag: v5.0.0-beta3~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72d23135799059d4282ea5764455f92f39ced5a5;p=thirdparty%2Fbootstrap.git reuse existing popper on show during tooltip fadeout --- diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 857f72c8ad..de7dcca693 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -284,11 +284,11 @@ class Tooltip extends BaseComponent { EventHandler.trigger(this._element, this.constructor.Event.INSERTED) if (this._popper) { - this._popper.destroy() + this._popper.update() + } else { + this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)) } - this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)) - tip.classList.add(CLASS_NAME_SHOW) const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass