File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -740,6 +740,23 @@ bot.dom.getOverflowState = function(elem, opt_region) {
740
740
return bot . dom . OverflowState . HIDDEN ;
741
741
}
742
742
743
+ if ( goog . userAgent . IE ) {
744
+ // On IE, if the containing element has scroll bars, the
745
+ // height and width given by getComputedStyle differ from the
746
+ // client bounding rect. To avoid accidentally assuming the
747
+ // point is not overflowed, when it's really behind a scrollbar,
748
+ // use the effective height and width of the container.
749
+ var effectiveWidth = goog . string . parseInt ( bot . dom . getEffectiveStyle ( container , "width" ) ) ;
750
+ var effectiveHeight = goog . string . parseInt ( bot . dom . getEffectiveStyle ( container , "height" ) ) ;
751
+ if ( effectiveWidth != containerRect . width ||
752
+ effectiveHeight != containerRect . height ) {
753
+ containerRect = new goog . math . Rect ( containerRect . left ,
754
+ containerRect . top ,
755
+ effectiveWidth ,
756
+ effectiveHeight ) ;
757
+ }
758
+ }
759
+
743
760
// Check "underflow": if an element is to the left or above the container
744
761
var underflowsX = region . right < containerRect . left ;
745
762
var underflowsY = region . bottom < containerRect . top ;
You can’t perform that action at this time.
0 commit comments