Skip to content

Commit

Permalink
Merge pull request #17 from leavesster/master
Browse files Browse the repository at this point in the history
fix: totally scrolled check need consider value is rounded
  • Loading branch information
surunzi committed Jul 8, 2024
2 parents 6a8931f + 0d1da08 commit cc87ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ export default class Console extends Component<IOptions> {
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
Expand Down

0 comments on commit cc87ff6

Please sign in to comment.