From 2a8268097a0b36e522804996f3f24ea5a5eccd68 Mon Sep 17 00:00:00 2001 From: Nicklas Ansman Giertz Date: Wed, 6 Jun 2012 22:22:33 +0200 Subject: [PATCH] Make tooltips work with SVG elements --- js/bootstrap-tooltip.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 49b5f7286a07..3cbfb2d41046 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -192,10 +192,7 @@ } , getPosition: function (inside) { - return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { - width: this.$element[0].offsetWidth - , height: this.$element[0].offsetHeight - }) + return $.extend({}, this.$element[0].getBoundingClientRect(), (inside ? {top: 0, left: 0} : {})) } , getTitle: function () { @@ -267,4 +264,4 @@ , template: '
' } -}( window.jQuery ); \ No newline at end of file +}( window.jQuery );