mirror of https://github.com/tiangolo/fastapi.git
🐛 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:
parent
98ec6a6079
commit
1088d2abd9
|
|
@ -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…
Reference in New Issue