From 0d1da0803329811aa4b15a9d1540a542af97dbd2 Mon Sep 17 00:00:00 2001 From: yleaf <11785335+leavesster@users.noreply.github.com> Date: Thu, 21 Dec 2023 11:09:12 +0800 Subject: [PATCH] fix: totally scrolled check need consider value is rounded --- src/console/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/console/index.ts b/src/console/index.ts index 020a5a2..a1aa51f 100644 --- a/src/console/index.ts +++ b/src/console/index.ts @@ -698,7 +698,7 @@ export default class Console extends Component { let isAtBottom = false if (scrollHeight === offsetHeight) { isAtBottom = true - } else if (scrollTop === scrollHeight - offsetHeight) { + } else if (Math.abs(scrollHeight - offsetHeight - scrollTop) < 1) { isAtBottom = true } this.isAtBottom = isAtBottom