Fixed auto scroll in mitmweb (#6038)

Co-authored-by: y52en <email@example.com>
This commit is contained in:
y52en 2023-04-01 20:29:44 +09:00 committed by GitHub
parent 04d9249ab1
commit e0b6734ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ import React from "react";
import ReactDOM from "react-dom";
const symShouldStick = Symbol("shouldStick") as any;
const isAtBottom = (v) => v.scrollTop + v.clientHeight === v.scrollHeight;
const isAtBottom = (v) =>
Math.round(v.scrollTop) + v.clientHeight === v.scrollHeight;
export default (Component) =>
Object.assign(