mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 11:43:10 +02:00
improvements
This commit is contained in:
1 file changed
+1
-3
@@ -256,11 +256,9 @@ async function onLocationHashChange() {
|
|||||||
// eslint-disable-next-line unicorn/prefer-query-selector
|
// eslint-disable-next-line unicorn/prefer-query-selector
|
||||||
const commentElement = document.getElementById(hashValue);
|
const commentElement = document.getElementById(hashValue);
|
||||||
if (commentElement) {
|
if (commentElement) {
|
||||||
commentElement.scrollIntoView();
|
commentElement.scrollIntoView({behavior: 'instant'});
|
||||||
document.body.setAttribute(diffAutoScrollAttr, 'true');
|
|
||||||
window.location.hash = '';
|
window.location.hash = '';
|
||||||
window.location.hash = currentHash;
|
window.location.hash = currentHash;
|
||||||
setTimeout(() => document.body.removeAttribute(diffAutoScrollAttr), 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user