Merge pull request #86 from toeverything/fix/scroll

fix: fixed #81
This commit is contained in:
Qi
2022-08-04 16:23:49 +08:00
committed by GitHub

View File

@@ -30,7 +30,6 @@ export class ScrollManager {
constructor(editor: BlockEditor) {
this._editor = editor;
(window as any).scrollManager = this;
}
private _updateScrollInfo(left: number, top: number) {
@@ -111,6 +110,7 @@ export class ScrollManager {
}
public emitScrollEvent(event: UIEvent) {
this.scrollContainer = event.target as HTMLElement;
this._scrollDirection = this._getScrollDirection();
this._scrollMoveOffset = Math.abs(
this.scrollContainer.scrollTop - this._scrollRecord[0]