File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -281,19 +281,21 @@ const OverlayTrigger = React.createClass({
281
281
282
282
_getContainerDimensions ( ) {
283
283
const containerNode = this . getContainerDOMNode ( ) ;
284
- let width , height ;
284
+ let width , height , scroll ;
285
+
285
286
if ( containerNode . tagName === 'BODY' ) {
286
287
width = window . innerWidth ;
287
288
height = window . innerHeight ;
289
+ scroll =
290
+ domUtils . ownerDocument ( containerNode ) . documentElement . scrollTop ||
291
+ containerNode . scrollTop ;
288
292
} else {
289
293
width = containerNode . offsetWidth ;
290
294
height = containerNode . offsetHeight ;
295
+ scroll = containerNode . scrollTop ;
291
296
}
292
297
293
- return {
294
- width, height,
295
- scroll : containerNode . scrollTop
296
- } ;
298
+ return { width, height, scroll} ;
297
299
} ,
298
300
299
301
getPosition ( ) {
You can’t perform that action at this time.
0 commit comments