🐛 Prevent scroll-to-top on restart/fast buttons in `termynal.js` (#13714)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Ashish Pandey 2025-08-31 16:17:57 +05:45 committed by GitHub
parent 98ec6a6079
commit 1088d2abd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

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