修复卡顿问题,返回顶部卡顿

This commit is contained in:
Vaica committed 2026-06-02 15:58:14 +08:00
1 parent 40a86bcc76
commit fadefdc0a1
1 file changed
+2 -1
@@ -205,7 +205,8 @@ window.initFloatingTools = function() {
e.preventDefault();
var comments = document.getElementById('Comments') || document.querySelector('.artalk');
if (comments) {
comments.scrollIntoView({ behavior: 'smooth', block: 'start' });
var y = comments.getBoundingClientRect().top + window.scrollY - 20;
window.scrollTo({ top: y, behavior: 'smooth' });
}
});
}