From 3a681ad79e6ebb051d2c3c0718c63ed1f2bd1665 Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Mon, 13 Mar 2023 11:17:23 -0300 Subject: [PATCH] Remove timeOut and smooth behavior on scroll --- src/components/Board/Output/SymbolOutput/SymbolOutput.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Board/Output/SymbolOutput/SymbolOutput.js b/src/components/Board/Output/SymbolOutput/SymbolOutput.js index c6a1ade15..c519959ae 100644 --- a/src/components/Board/Output/SymbolOutput/SymbolOutput.js +++ b/src/components/Board/Output/SymbolOutput/SymbolOutput.js @@ -58,8 +58,7 @@ class SymbolOutput extends PureComponent { try { const lastOutputSymbol = this.scrollContainerRef.current.lastElementChild; lastOutputSymbol.scrollIntoView({ - behavior: 'smooth', - inline: 'start' + inline: 'end' }); } catch (err) { console.error('Error during autoScroll of output bar', err); @@ -67,8 +66,7 @@ class SymbolOutput extends PureComponent { }; componentDidMount() { - //using a setTimeout to propperly works of scroll in to view depending of screen size render - setTimeout(this.scrollToLastSymbol, 200); + this.scrollToLastSymbol(); } componentDidUpdate(prevProps) {