From: Johann-S Date: Fri, 7 Apr 2017 09:12:17 +0000 (+0200) Subject: Begin to add arrow to Popover and Tooltip X-Git-Tag: v4.0.0-beta~166^2~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81e07ec05218d75d64454787449dcb870b5b66ec;p=thirdparty%2Fbootstrap.git Begin to add arrow to Popover and Tooltip --- 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 @@ - +