Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-11-29 17:16:42 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-12-01 19:00:36 +0300
commitbd79d69a73a77172584baadf9aa36e2d2091160e (patch)
tree626da140e9385a5c53a54c99940c94bec697b2e1
parent1f7b83203d893ba674f6a0c54481e84378276a19 (diff)
Tooltip: a simple code-block position change
-rw-r--r--js/src/tooltip.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index fc96812b46..5fd1927c9e 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -274,27 +274,12 @@ class Tooltip extends BaseComponent {
return
}
- const tip = this.getTipElement()
- const complete = () => {
- if (this._isWithActiveTrigger()) {
- return
- }
-
- if (!this._isHovered) {
- tip.remove()
- }
-
- this._element.removeAttribute('aria-describedby')
- EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)
-
- this._disposePopper()
- }
-
const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)
if (hideEvent.defaultPrevented) {
return
}
+ const tip = this.getTipElement()
tip.classList.remove(CLASS_NAME_SHOW)
// If this is a touch-enabled device we remove the extra
@@ -309,6 +294,21 @@ class Tooltip extends BaseComponent {
this._activeTrigger[TRIGGER_FOCUS] = false
this._activeTrigger[TRIGGER_HOVER] = false
+ const complete = () => {
+ if (this._isWithActiveTrigger()) {
+ return
+ }
+
+ if (!this._isHovered) {
+ tip.remove()
+ }
+
+ this._element.removeAttribute('aria-describedby')
+ EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)
+
+ this._disposePopper()
+ }
+
this._queueCallback(complete, this.tip, this._isAnimated())
this._isHovered = false
}