@@ -1814,7 +1814,6 @@ $.Tooltipster.prototype = {
1814
1814
} ) ;
1815
1815
} ) ;
1816
1816
1817
-
1818
1817
if ( self . __options . triggerClose . mouseleave
1819
1818
|| ( self . __options . triggerClose . touchleave && env . hasTouchCapability )
1820
1819
) {
@@ -3148,12 +3147,14 @@ Ruler.prototype = {
3148
3147
3149
3148
this . __forceRedraw ( ) ;
3150
3149
3151
- var tooltipBrc = this . __$tooltip [ 0 ] . getBoundingClientRect ( ) ,
3150
+ var tooltipBcr = this . __$tooltip [ 0 ] . getBoundingClientRect ( ) ,
3152
3151
result = { size : {
3153
- // brc.width/height are not defined in IE8- but in this
3154
- // case, brc.right/bottom will have the same value
3155
- height : tooltipBrc . bottom ,
3156
- width : tooltipBrc . right
3152
+ // bcr.width/height are not defined in IE8- but in this
3153
+ // case, bcr.right/bottom will have the same value
3154
+ // except in iOS 8+ where tooltipBcr.bottom is wrong after scrolling
3155
+ // for reasons yet to be determined
3156
+ height : tooltipBcr . height || tooltipBcr . bottom ,
3157
+ width : tooltipBcr . right
3157
3158
} } ;
3158
3159
3159
3160
if ( this . constraints ) {
@@ -3170,20 +3171,20 @@ Ruler.prototype = {
3170
3171
3171
3172
var $content = this . __$tooltip . find ( '.tooltipster-content' ) ,
3172
3173
height = this . __$tooltip . outerHeight ( ) ,
3173
- contentBrc = $content [ 0 ] . getBoundingClientRect ( ) ,
3174
+ contentBcr = $content [ 0 ] . getBoundingClientRect ( ) ,
3174
3175
fits = {
3175
3176
height : height <= this . constraints . height ,
3176
3177
width : (
3177
3178
// this condition accounts for min-width property that
3178
3179
// may apply
3179
- tooltipBrc . width <= this . constraints . width
3180
+ tooltipBcr . width <= this . constraints . width
3180
3181
// the -1 is here because scrollWidth actually returns
3181
- // a rounded value, and may be greater than brc .width if
3182
+ // a rounded value, and may be greater than bcr .width if
3182
3183
// it was rounded up. This may cause an issue for contents
3183
3184
// which actually really overflow by 1px or so, but that
3184
3185
// should be rare. Not sure how to solve this efficiently.
3185
3186
// See http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
3186
- && contentBrc . width >= $content [ 0 ] . scrollWidth - 1
3187
+ && contentBcr . width >= $content [ 0 ] . scrollWidth - 1
3187
3188
)
3188
3189
} ;
3189
3190
0 commit comments