Actually, I don't think this is quite right. It should probably be
if (axs.utils.canScrollTo(element, parent) && !(axs.utils.elementIsOutsideScrollArea(parent)))
    return false;