From 99c07d8599dd3e137cb4b9fda35d5fccab9b4da5 Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Mon, 13 Mar 2023 11:14:28 -0300 Subject: [PATCH 1/2] Remove withMobileDialog HOC --- .../Board/Output/PhraseShare/PhraseShare.component.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Board/Output/PhraseShare/PhraseShare.component.js b/src/components/Board/Output/PhraseShare/PhraseShare.component.js index 007e5cf48..7fca0aefb 100644 --- a/src/components/Board/Output/PhraseShare/PhraseShare.component.js +++ b/src/components/Board/Output/PhraseShare/PhraseShare.component.js @@ -22,7 +22,6 @@ import { RedditShareButton, RedditIcon } from 'react-share'; -import withMobileDialog from '@material-ui/core/withMobileDialog'; import messages from './PhraseShare.messages'; import './PhraseShare.css'; @@ -144,4 +143,4 @@ PhraseShare.propTypes = { onCopyPhrase: PropTypes.func }; -export default withMobileDialog()(PhraseShare); +export default PhraseShare; From 3a681ad79e6ebb051d2c3c0718c63ed1f2bd1665 Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Mon, 13 Mar 2023 11:17:23 -0300 Subject: [PATCH 2/2] 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) {