mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
c56297ff7f
commit
bf2cd7398c
1 changed files with 5 additions and 3 deletions
|
|
@ -67,9 +67,11 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
|
||||||
!protyle.wysiwyg.element.firstElementChild) {
|
!protyle.wysiwyg.element.firstElementChild) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (protyle.scroll.lastScrollTop > element.scrollTop) {
|
||||||
if (protyle.scroll.lastScrollTop - element.scrollTop > 0) {
|
if (element.scrollTop === 0) {
|
||||||
// up
|
// 使用鼠标拖拽滚动条中无法准确获取 scrollTop,在此忽略
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (element.scrollTop < element.clientHeight &&
|
if (element.scrollTop < element.clientHeight &&
|
||||||
protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") !== "1") {
|
protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") !== "1") {
|
||||||
// 禁用滚动时会产生抖动 https://ld246.com/article/1666717094418
|
// 禁用滚动时会产生抖动 https://ld246.com/article/1666717094418
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue