]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🐛 Prevent scroll-to-top on restart/fast buttons in `termynal.js` (#13714)
authorAshish Pandey <126683810+Ashish-Pandey62@users.noreply.github.com>
Sun, 31 Aug 2025 10:32:57 +0000 (16:17 +0545)
committerGitHub <noreply@github.com>
Sun, 31 Aug 2025 10:32:57 +0000 (12:32 +0200)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
docs/en/docs/js/termynal.js

index 4ac32708a31a0ee74ae1f03b48de8aa8790beb26..82d04e2d0b1b3025e86fb0692ebe2eefb9b1c2a9 100644 (file)
@@ -133,7 +133,7 @@ class Termynal {
             this.container.innerHTML = ''
             this.init()
         }
-        restart.href = '#'
+        restart.href = "javascript:void(0)"
         restart.setAttribute('data-terminal-control', '')
         restart.innerHTML = "restart ↻"
         return restart
@@ -147,7 +147,7 @@ class Termynal {
             this.typeDelay = 0
             this.startDelay = 0
         }
-        finish.href = '#'
+        finish.href = "javascript:void(0)"
         finish.setAttribute('data-terminal-control', '')
         finish.innerHTML = "fast →"
         this.finishElement = finish