aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-08-24 09:40:11 +0200
committerJohann-S <[email protected]>2017-08-24 09:33:49 +0100
commit4571ab0e57a5d2ff251b8c174ab0f693c5892dce (patch)
treeea784cc4debeb26ea3121940d2f21448a86b79df /js/src
parent3a6fc265f6db182ad8fdc2b1b5b5dadcbb411cfc (diff)
downloadbootstrap-4571ab0e57a5d2ff251b8c174ab0f693c5892dce.tar.xz
bootstrap-4571ab0e57a5d2ff251b8c174ab0f693c5892dce.zip
Fix toggle for Tooltips/Popover which was called even if the Tooltip/Popover was disabled
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tooltip.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 7dfe9dfc0..37573cf49 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -184,6 +184,10 @@ const Tooltip = (($) => {
}
toggle(event) {
+ if (!this._isEnabled) {
+ return
+ }
+
if (event) {
const dataKey = this.constructor.DATA_KEY
let context = $(event.currentTarget).data(dataKey)
@@ -234,8 +238,8 @@ const Tooltip = (($) => {
if (this._popper !== null) {
this._popper.destroy()
}
- this._popper = null
+ this._popper = null
this.element = null
this.config = null
this.tip = null
@@ -706,7 +710,6 @@ const Tooltip = (($) => {
}
})
}
-
}