From 926fb111581e9854d4c50b5f5e0f6876d7cbf176 Mon Sep 17 00:00:00 2001 From: lbryant Date: Thu, 20 Aug 2015 01:03:29 -0400 Subject: use Tether addTargetClasses: false option instead of manually removing them --- js/src/tooltip.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'js/src') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index a65caf26e..0af63c981 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -270,12 +270,13 @@ const Tooltip = (($) => { this._tether = new Tether({ attachment, - element : tip, - target : this.element, - classes : TetherClass, - classPrefix : CLASS_PREFIX, - offset : this.config.offset, - constraints : this.config.constraints + element : tip, + target : this.element, + classes : TetherClass, + classPrefix : CLASS_PREFIX, + offset : this.config.offset, + constraints : this.config.constraints, + addTargetClasses: false }) Util.reflow(tip) @@ -384,12 +385,6 @@ const Tooltip = (($) => { cleanupTether() { if (this._tether) { this._tether.destroy() - - // clean up after tether's junk classes - // remove after they fix issue - // (https://github.com/HubSpot/tether/issues/36) - $(this.element).removeClass(this._removeTetherClasses) - $(this.tip).removeClass(this._removeTetherClasses) } } -- cgit v1.2.3 From 8b15b5a2622043a57138ff38cd99ee7c9a418bf0 Mon Sep 17 00:00:00 2001 From: lbryant Date: Thu, 20 Aug 2015 01:22:16 -0400 Subject: _removeTetherClasses is no longer referenced --- js/src/tooltip.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'js/src') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 0af63c981..f54a1dca9 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -438,12 +438,6 @@ const Tooltip = (($) => { } } - _removeTetherClasses(i, css) { - return ((css.baseVal || css).match( - new RegExp(`(^|\\s)${CLASS_PREFIX}-\\S+`, 'g')) || [] - ).join(' ') - } - _fixTitle() { let titleType = typeof this.element.getAttribute('data-original-title') if (this.element.getAttribute('title') || -- cgit v1.2.3