]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix tooltip positioning for IE8 6737/head
authorGuillaume Smet <guillaume.smet@gmail.com>
Tue, 29 Jan 2013 18:50:13 +0000 (19:50 +0100)
committerGuillaume Smet <guillaume.smet@gmail.com>
Tue, 29 Jan 2013 18:50:13 +0000 (19:50 +0100)
IE8 defines a placeholder object getBoundingClientRect which breaks the new getPosition() method

js/bootstrap-tooltip.js

index c23d8267a8e7962bf0f4e0808646e6c2e3b3eaf7..9ba2d1214a4376e6294cf7b94b4261420c3c15fd 100644 (file)
 
   , 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())