Merge pull request #3857 from mikelei8291/preview-fixes

快速收起评论: 收起评论时使用平滑滚动
This commit is contained in:
Grant Howard 2022-12-06 19:36:01 +08:00 committed by GitHub
commit 42a64c5834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ const entry = async () => {
button.innerHTML = '收起评论'
button.addEventListener('click', () => {
clickHandler()
card.scrollIntoView()
card.scrollIntoView({ behavior: 'smooth' })
})
commentBox.insertAdjacentElement('beforeend', button)
}