Browse Source

🐛 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>
pull/14026/head
Ashish Pandey 2 weeks ago
committed by GitHub
parent
commit
1088d2abd9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      docs/en/docs/js/termynal.js

4
docs/en/docs/js/termynal.js

@ -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

Loading…
Cancel
Save