From: Guillaume Smet Date: Tue, 29 Jan 2013 18:50:13 +0000 (+0100) Subject: Fix tooltip positioning for IE8 X-Git-Tag: v2.3.0^2~11^2^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6737%2Fhead;p=thirdparty%2Fbootstrap.git Fix tooltip positioning for IE8 IE8 defines a placeholder object getBoundingClientRect which breaks the new getPosition() method --- diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index c23d8267a8..9ba2d1214a 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -212,7 +212,7 @@ , getPosition: function () { var el = this.$element[0] - return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { + return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { width: el.offsetWidth , height: el.offsetHeight }, this.$element.offset())