diff --git a/page/src/components/output.tsx b/page/src/components/output.tsx index 4dbf1918..beb8cabc 100644 --- a/page/src/components/output.tsx +++ b/page/src/components/output.tsx @@ -181,7 +181,6 @@ export class Output extends React.Component { private listRef: React.RefObject; private resizeObserver: ResizeObserver; private scrollElement: HTMLDivElement | null | undefined; - private scrollActive: boolean = false; constructor(props: OutputProps) { super(props); @@ -190,7 +189,6 @@ export class Output extends React.Component { this.logLine = this.logLine.bind(this); this.logLines = this.logLines.bind(this); this.handleScroll = this.handleScroll.bind(this); - this.handleScrollEnd = this.handleScrollEnd.bind(this); this.updateDimensions = this.updateDimensions.bind(this); this.outputRef = React.createRef(); @@ -213,10 +211,6 @@ export class Output extends React.Component { } handleScroll(e: Event) { - if (this.scrollActive) { - return; - } - const threshold = 40; const element = e.target as HTMLElement; const { scrollTop, scrollHeight, clientHeight } = element; @@ -225,14 +219,8 @@ export class Output extends React.Component { this.setState({ autoScroll: isAtEnd }); } - handleScrollEnd(e: Event) { - this.scrollActive = false; - this.handleScroll(e); - } - unregisterScrollListener() { this.scrollElement?.removeEventListener("scroll", this.handleScroll); - this.scrollElement?.removeEventListener("scrollend", this.handleScrollEnd); } registerScrollListener(element: HTMLDivElement | null | undefined) { @@ -243,7 +231,6 @@ export class Output extends React.Component { this.unregisterScrollListener(); this.scrollElement = element; element?.addEventListener("scroll", this.handleScroll); - element?.addEventListener("scrollend", this.handleScrollEnd); } registerScrollOnList() { @@ -267,7 +254,6 @@ export class Output extends React.Component { scrollListToEnd() { if (this.listRef.current && this.state.lines.length > 0) { - this.scrollActive = true; this.listRef.current.scrollToRow({ index: this.state.lines.length - 1, behavior: "instant",