We set overflow to hidden in the opposite scroll direction only if we can't actually scroll in that direction, causing the white square where neither scrollbar overlaps to appear at the lower right corner.