function disableScroll(node) {
  const scrollAncestorsOverflowY = getScrollAncestorsOverflowY(node);
  const toggle = (on) => scrollAncestorsOverflowY.forEach((overflowY, ancestor) => {
    ancestor.style.setProperty('overflow-y', on ? 'hidden' : overflowY);
  });

  toggle(true);
  return () => toggle(false);
}
Disabling the scroll on a node involves finding all the scrollable ancestors
and set their 'overflow-y' CSS property to 'hidden'. When all ancestors have
'overflow-y: hidden' (up to the document element) there is no scroll
container, thus all the scroll outside of the node is disabled. In order to
enable scroll again, we store the previous value of the 'overflow-y' for
every ancestor in a closure and reset it back.

@param {HTMLElement} node Any DOM element.