Really smooth scrolling (viewport "clings" to el):
let done = false;
function updateScroll() {
ref.scrollIntoView({ block: "nearest" });
if (!done) requestAnimationFrame(this);
}
requestAnimationFrame(updateScroll);
setTimeout(() => done = true, 150); // 150ms