Skip to content

Commit 25a3b5b

Browse files
committed
fix: scroll from secret to transition1
1 parent 71f30d8 commit 25a3b5b

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

src/js/OnePasswordExplainer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
hideAllSections,
55
scrollToAccountCreationSection,
66
scrollToDecryptionSection,
7-
scrollToSecretKeySection,
87
} from '~/demo/DemoFlowHelpers';
98
import { AccountCompletionSection } from '~/demo/sections/AccountCompletion/AccountCompletionSection';
109
import { DecryptionSection } from '~/demo/sections/Decryption/DecryptionSection';
@@ -92,7 +91,7 @@ const onCreatedRegistrationInfo = (o: any) => {
9291
$transition1.classList.remove('hidden');
9392
$transition2.classList.remove('hidden');
9493

95-
scrollToSecretKeySection('center');
94+
$transition1.scrollIntoView({ behavior: 'smooth', block: 'center' });
9695
};
9796

9897
const onDerivedKeys = () => {

src/js/demo/DemoFlowHelpers.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ export const hideAllSections = () => {
3232
allTransitions.forEach((t) => t.classList.add('hidden'));
3333
};
3434

35-
export const scrollToSecretKeySection = (
36-
where: ScrollLogicalPosition = 'start',
37-
): void => {
38-
$secretKeySection.scrollIntoView({ behavior: 'smooth', block: where });
39-
};
40-
4135
export const scrollToDecryptionSection = (
4236
where: ScrollLogicalPosition = 'start',
4337
): void => {
4438
$decryptionSection.scrollIntoView({ behavior: 'smooth', block: where });
4539
};
40+
4641
export const scrollToAccountCreationSection = (
4742
where: ScrollLogicalPosition = 'start',
4843
): void => {

0 commit comments

Comments
 (0)