From 4571ab0e57a5d2ff251b8c174ab0f693c5892dce Mon Sep 17 00:00:00 2001 From: Johann-S Date: Thu, 24 Aug 2017 09:40:11 +0200 Subject: Fix toggle for Tooltips/Popover which was called even if the Tooltip/Popover was disabled --- js/src/tooltip.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/src') 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 = (($) => { } }) } - } -- cgit v1.2.3