feat: add scrolling
This commit is contained in:
parent
4b85ed5fb5
commit
d0e4539f9c
5 changed files with 85 additions and 22 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue