aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx8
-rw-r--r--packages/website/ts/components/portal/portal.tsx6
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index 296b410fe..ccc8d9e86 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -47,8 +47,14 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
public componentWillUnmount(): void {
this._unlisten();
}
- public componentDidUpdate(): void {
+ public componentDidUpdate(prevProps: PortalOnboardingFlowProps): void {
this._overrideOnboardingStateIfShould();
+ if (!prevProps.isRunning && this.props.isRunning) {
+ // On mobile, make sure the wallet is completely visible.
+ if (this.props.screenWidth === ScreenWidths.Sm) {
+ document.querySelector('.wallet').scrollIntoView();
+ }
+ }
}
public render(): React.ReactNode {
return (
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index 6da41e64b..8a86a7c8d 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -154,12 +154,6 @@ export class Portal extends React.Component<PortalProps, PortalState> {
// tslint:disable-next-line:no-floating-promises
this._fetchBalancesAndAllowancesAsync(this._getCurrentTrackedTokensAddresses());
}
- if (!prevProps.isPortalOnboardingShowing && this.props.isPortalOnboardingShowing) {
- // On mobile, make sure the wallet is completely visible.
- if (this.props.screenWidth === ScreenWidths.Sm) {
- document.querySelector('.wallet').scrollIntoView();
- }
- }
}
public componentWillReceiveProps(nextProps: PortalProps): void {
if (nextProps.networkId !== this.state.prevNetworkId) {