Scroll to wallet when onboarding automatically starts as well
This commit is contained in:
@@ -169,7 +169,6 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
|
||||
this._autoStartOnboardingIfShould();
|
||||
this._adjustStepIfShould();
|
||||
}
|
||||
|
||||
private _adjustStepIfShould(): void {
|
||||
const stepIndex = this.props.stepIndex;
|
||||
if (this._isAddressAvailable()) {
|
||||
@@ -197,6 +196,10 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
|
||||
const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
|
||||
analytics.logEvent('Portal', 'Onboarding Started - Automatic', networkName, this.props.stepIndex);
|
||||
this.props.updateIsRunning(true);
|
||||
// On mobile, make sure the wallet is completely visible.
|
||||
if (utils.isMobile(this.props.screenWidth)) {
|
||||
document.querySelector('.wallet').scrollIntoView();
|
||||
}
|
||||
}
|
||||
}
|
||||
private _updateOnboardingStep(stepIndex: number): void {
|
||||
|
||||
Reference in New Issue
Block a user