aboutsummaryrefslogtreecommitdiff
path: root/js/dist/tooltip.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-09-07 18:37:44 +0300
committerGitHub <[email protected]>2021-09-07 18:37:44 +0300
commit0d81d3cbc14dfcdca8a868e3f25189a4f1ab273c (patch)
treed9edfb06a0a5718209bf6db9b020b4ec003c6fde /js/dist/tooltip.js
parentb6855ae13817f516f63bd2916ead5243e07f210b (diff)
downloadbootstrap-5.1.1.tar.xz
bootstrap-5.1.1.zip
Release v5.1.1 (#34869)v5.1.1
* Prepare v5.1.1. * Dist
Diffstat (limited to 'js/dist/tooltip.js')
-rw-r--r--js/dist/tooltip.js35
1 files changed, 23 insertions, 12 deletions
diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js
index 4bcf1860b..9f8380086 100644
--- a/js/dist/tooltip.js
+++ b/js/dist/tooltip.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap tooltip.js v5.1.0 (https://getbootstrap.com/)
+ * Bootstrap tooltip.js v5.1.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -40,7 +40,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/index.js
+ * Bootstrap (v5.1.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -182,7 +182,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/sanitizer.js
+ * Bootstrap (v5.1.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -295,7 +295,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): tooltip.js
+ * Bootstrap (v5.1.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -469,9 +469,7 @@
this.tip.remove();
}
- if (this._popper) {
- this._popper.destroy();
- }
+ this._disposePopper();
super.dispose();
}
@@ -491,6 +489,15 @@
if (showEvent.defaultPrevented || !isInTheDom) {
return;
+ } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`
+ // This will be removed later in favor of a `setContent` method
+
+
+ if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {
+ this._disposePopper();
+
+ this.tip.remove();
+ this.tip = null;
}
const tip = this.getTipElement();
@@ -580,11 +587,7 @@
EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDDEN);
- if (this._popper) {
- this._popper.destroy();
-
- this._popper = null;
- }
+ this._disposePopper();
};
const hideEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDE);
@@ -964,6 +967,14 @@
this._cleanTipClass();
this._addAttachmentClass(this._getAttachment(state.placement));
+ }
+
+ _disposePopper() {
+ if (this._popper) {
+ this._popper.destroy();
+
+ this._popper = null;
+ }
} // Static