feat: add scrolling

This commit is contained in:
Ananth Venkatesh 2025-02-10 01:56:10 -05:00
parent 4b85ed5fb5
commit d0e4539f9c
Signed by: ananthv
GPG key ID: 4BB578E748CFE4FF
5 changed files with 85 additions and 22 deletions

View file

@ -27,6 +27,13 @@
document.execCommand("copy");
document.body.removeChild(textArea);
});
app.ports.scrollTo.subscribe((id) => {
let element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: "smooth" });
}
});
</script>
</body>
</html>