aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/onboarding
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-04 09:05:00 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-04 09:05:00 +0800
commit6e87e3e1ac1eb6200b9f6797890b7e42efefae5d (patch)
tree8fe1fc1164ad77a32a3cbd1eb11dd04f30e04338 /packages/website/ts/components/onboarding
parent52c956222e8a737c05bae49a97e457df81933000 (diff)
downloaddexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar.gz
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar.bz2
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar.lz
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar.xz
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.tar.zst
dexon-sol-tools-6e87e3e1ac1eb6200b9f6797890b7e42efefae5d.zip
Fix issue where onboarding doesn't scroll to wallet when starting from relayers page
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index e01da68a7..1c2c92fd1 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -57,13 +57,12 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
this._unlisten();
}
public componentDidUpdate(prevProps: PortalOnboardingFlowProps): void {
- this._adjustStepIfShould();
- if (!prevProps.isRunning && this.props.isRunning) {
+ // Any one of steps 0-3 could be the starting step, and we only want to reset the scroll on the starting step.
+ if (this.props.isRunning && utils.isMobileWidth(this.props.screenWidth) && this.props.stepIndex < 3) {
// On mobile, make sure the wallet is completely visible.
- if (this.props.screenWidth === ScreenWidths.Sm) {
- document.querySelector('.wallet').scrollIntoView();
- }
+ document.querySelector('.wallet').scrollIntoView();
}
+ this._adjustStepIfShould();
if (!prevProps.blockchainIsLoaded && this.props.blockchainIsLoaded) {
this._autoStartOnboardingIfShould();
}