]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
reuse existing popper on show during tooltip fadeout
authorRyan Berliner <ryan.berliner@gmail.com>
Sun, 7 Mar 2021 13:28:41 +0000 (08:28 -0500)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 16 Mar 2021 05:48:50 +0000 (07:48 +0200)
js/src/tooltip.js

index 857f72c8ad2c54531abe66637f0c73829248e4cb..de7dcca69391ede0898b3c30467cf5a2f3530517 100644 (file)
@@ -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