packages/material-ui/src/Popover/Popover.js
function getScrollParent(parent, child) {
  let element = child;
  let scrollTop = 0;

  while (element && element !== parent) {
    element = element.parentNode;
    scrollTop += element.scrollTop;
  }
  return scrollTop;
}
function getScrollParent(parent, child) {
  let element = child;
  let scrollTop = 0;

  while (element && element !== parent) {
    element = element.parentNode;
    scrollTop += element.scrollTop;
  }
  return scrollTop;
}
function getScrollParent ( parent , child ) { let element = child ; let scrollTop = 0 ; while ( element && element !== parent ) { element = element . parentNode ; scrollTop += element . scrollTop ; } return scrollTop ; }
Sum the scrollTop between two elements.
Sum the scrollTop between two elements .