修复卡顿问题,返回顶部卡顿
This commit is contained in:
1 parent
2b53592adc
commit
422e567afb
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' });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user