- From: Gus via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Feb 2023 23:28:51 +0000
- To: public-css-archive@w3.org
You can add a [transitionend](https://developer.mozilla.org/en-US/docs/Web/API/Element/transitionend_event) event listener. This worked for me, though sometimes I get multiple callbacks for a single scroll (workaround could be for the event listener to detach itself). ``` const element = document.getElementById("element"); element.scrollIntoView({ behavior: "smooth" }); element.addEventListener("transitionend", function() { console.log("Scrolling finished"); }); ``` -- GitHub Notification of comment by guswelter Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3744#issuecomment-1426489291 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 February 2023 23:28:52 UTC