mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-20 15:44:54 +01:00
improvements
This commit is contained in:
parent
ff5544a329
commit
a9d887a5e8
@ -256,11 +256,9 @@ async function onLocationHashChange() {
|
||||
// eslint-disable-next-line unicorn/prefer-query-selector
|
||||
const commentElement = document.getElementById(hashValue);
|
||||
if (commentElement) {
|
||||
commentElement.scrollIntoView();
|
||||
document.body.setAttribute(diffAutoScrollAttr, 'true');
|
||||
commentElement.scrollIntoView({behavior: 'instant'});
|
||||
window.location.hash = '';
|
||||
window.location.hash = currentHash;
|
||||
setTimeout(() => document.body.removeAttribute(diffAutoScrollAttr), 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user