mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-21 08:33:09 -07:00
Center scrolled view
This commit is contained in:
parent
2ffc0d9e6b
commit
17c01ec5bb
2 changed files with 2 additions and 3 deletions
|
@ -189,8 +189,7 @@ haste.prototype.addLineNumbers = function(lineCount) {
|
|||
if(window.location.hash) {
|
||||
const hash = window.location.hash.substring(1);
|
||||
highlightLine(hash)
|
||||
console.log("try to get to line" + hash);
|
||||
document.getElementById("line" + hash)[0].scrollIntoView({
|
||||
document.getElementById('line' + hash).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center'
|
||||
});
|
||||
|
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue