diff --git a/js/src/popover.js b/js/src/popover.js index e20b50f976..02efe2b2ed 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -28,6 +28,7 @@ const Popover = (($) => { trigger : 'click', content : '', template : '' }) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index c4c4ee2f64..505a8d492a 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -37,6 +37,7 @@ const Tooltip = (($) => { const Default = { animation : true, template : '', trigger : 'hover focus', title : '', @@ -281,10 +282,8 @@ const Tooltip = (($) => { this._popper = new Popper(this.element, tip, { placement : attachment, + arrowElement : '.arrow', modifiers : { - arrow : { - element : Selector.TOOLTIP - }, offset : { offset : this.config.offset } @@ -335,7 +334,10 @@ const Tooltip = (($) => { this.element.removeAttribute('aria-describedby') $(this.element).trigger(this.constructor.Event.HIDDEN) - this._popper.destroy() + if (this._popper !== null) { + this._popper.destroy() + } + if (callback) { callback() } diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index e999514f7b..90b814e674 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -170,7 +170,7 @@ - +