Browse Source

Fix scroll position on auth pages

Fix scroll on auth pages for iOS
master
morethanwords 4 years ago
parent
commit
1d47a4eedd
  1. 10
      src/index.hbs
  2. 2
      src/pages/pagesManager.ts
  3. 34
      src/scss/partials/pages/_pages.scss

10
src/index.hbs

@ -28,10 +28,10 @@
<![endif]--> <![endif]-->
<div class="whole" id="auth-pages" style="display: none;"> <div class="whole" id="auth-pages" style="display: none;">
<div class="scrollable scrollable-y">
<div class="tabs-container auth-pages__container" data-slider="tabs"> <div class="tabs-container auth-pages__container" data-slider="tabs">
<div class="page-sign"> <div class="page-sign">
<div class="container center-align"> <div class="container center-align">
<div class="scrollable scrollable-y">
<div class="auth-image"> <div class="auth-image">
<svg class="sign-logo" xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"> <svg class="sign-logo" xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160">
<use href="#logo" /> <use href="#logo" />
@ -58,10 +58,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="page-signQR"> <div class="page-signQR">
<div class="container center-align"> <div class="container center-align">
<div class="scrollable scrollable-y">
<div class="auth-image"> <div class="auth-image">
<canvas id="qr-code"></canvas> <canvas id="qr-code"></canvas>
</div> </div>
@ -70,10 +68,8 @@
<div class="qr"><a href="#" class="a-qr">Or log in using your phone number</a></div> <div class="qr"><a href="#" class="a-qr">Or log in using your phone number</a></div>
</div> </div>
</div> </div>
</div>
<div class="page-authCode"> <div class="page-authCode">
<div class="container center-align"> <div class="container center-align">
<div class="scrollable scrollable-y">
<div class="auth-image"></div> <div class="auth-image"></div>
<div class="phone-wrapper"> <div class="phone-wrapper">
<h4 class="phone"></h4> <h4 class="phone"></h4>
@ -88,10 +84,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="page-password"> <div class="page-password">
<div class="container center-align"> <div class="container center-align">
<div class="scrollable scrollable-y">
<div class="auth-image"></div> <div class="auth-image"></div>
<h4 class="phone">Enter Your Password</h4> <h4 class="phone">Enter Your Password</h4>
<p class="subtitle">Your account is protected with<br>an additional password</p> <p class="subtitle">Your account is protected with<br>an additional password</p>
@ -105,10 +99,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="page-signUp"> <div class="page-signUp">
<div class="container center-align"> <div class="container center-align">
<div class="scrollable scrollable-y">
<div class="auth-image avatar-edit"> <div class="auth-image avatar-edit">
<canvas class="avatar-edit-canvas" id="canvas-avatar"></canvas> <canvas class="avatar-edit-canvas" id="canvas-avatar"></canvas>
<span class="tgico tgico-cameraadd"></span> <span class="tgico tgico-cameraadd"></span>

2
src/pages/pagesManager.ts

@ -13,7 +13,7 @@ class PagesManager {
constructor() { constructor() {
this.pagesDiv = document.getElementById('auth-pages') as HTMLDivElement; this.pagesDiv = document.getElementById('auth-pages') as HTMLDivElement;
this.selectTab = horizontalMenu(null, this.pagesDiv.firstElementChild as HTMLDivElement, null, () => { this.selectTab = horizontalMenu(null, this.pagesDiv.firstElementChild.firstElementChild as HTMLDivElement, null, () => {
if(this.page.onShown) { if(this.page.onShown) {
this.page.onShown(); this.page.onShown();
} }

34
src/scss/partials/pages/_pages.scss

@ -30,9 +30,26 @@
flex: 0 0 auto; flex: 0 0 auto;
} }
.tabs-container { > .scrollable {
height: 100%; display: flex;
flex-direction: column;
&:before, &:after {
content: " ";
flex: 1;
min-height: 3rem;
/* height: 105px; */
width: 100%; width: 100%;
}
}
.tabs-container {
max-width: 720px;
min-width: auto;
margin: 0 auto;
overflow-x: hidden;
/* height: 100%;
width: 100%; */
> div { > div {
/* justify-content: center; */ /* justify-content: center; */
@ -48,19 +65,6 @@
flex-direction: column; flex-direction: column;
} }
} }
.container > .scrollable {
display: flex;
flex-direction: column;
&:before, &:after {
content: " ";
flex: 1;
min-height: 3rem;
/* height: 105px; */
width: 100%;
}
}
} }
// @media (max-height: 858px) { // @media (max-height: 858px) {

Loading…
Cancel
Save