Skip to content

Commit

Permalink
reuse existing popper on show during tooltip fadeout
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBerliner authored and XhmikosR committed Mar 16, 2021
1 parent 70a68f0 commit 34620ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/tooltip.js
Expand Up @@ -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
Expand Down

0 comments on commit 34620ce

Please sign in to comment.