diff --git a/static/application.js b/static/application.js index 0bb886f..409e67c 100644 --- a/static/application.js +++ b/static/application.js @@ -233,7 +233,11 @@ haste.prototype.loadDocument = function(key) { if(window.location.hash) { const hash = window.location.hash.substring(1); highlightLine(hash) - document.getElementsByClassName("highlight")[0].scrollIntoView(); + document.getElementsByClassName("highlight")[0].scrollIntoView({ + behavior: 'auto', + block: 'center', + inline: 'center' + }); } } else {