Skip to content

Commit be8407a

Browse files
committed
feat(chrome-extension): adjusting the scroll down threshold
1 parent fe95c79 commit be8407a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/calm-eels-dream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@dolphin/chrome-extension': patch
3+
---
4+
5+
feat: adjusting the scroll down threshold

apps/chrome-extension/src/scripts/download-lark-docx-as-markdown.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,12 @@ const prepare = async (): Promise<PrepareResult> => {
455455
let direction = Direction.Down
456456
const calculateDirection = () => {
457457
const scrollHeight = docx.container?.scrollHeight ?? 0
458+
const clientHeight = docx.container?.clientHeight ?? 0
458459

459-
if (direction === Direction.Down && top > scrollHeight) {
460+
if (
461+
direction === Direction.Down &&
462+
top > scrollHeight + 2 * clientHeight
463+
) {
460464
return Direction.Up
461465
}
462466

0 commit comments

Comments
 (0)