mirror of
https://github.com/wekan/wekan.git
synced 2026-11-05 01:20:07 -05:00
fix: login/register page not scrollable on mobile — sign-up link unreachable
On phones body.mobile-mode pins <body> to position:fixed + height:100vh (an iOS board-view anti-bounce fix). The auth pages (userFormsLayout) have no inner #content scroller, and .auth-layout/.auth-dialog were sized to the viewport height, so the page was trapped at 100vh: the content below the form — the sign-up/sign-in link, legal notice and language selector — could not be scrolled into view, and the on-screen keyboard covered it. userFormsLayout now tags <body> with .userform-layout while mounted, and CSS lets those pages scroll as a normal document on mobile (position:static, height:auto, min-height:100vh) with the auth layout/dialog growing to their content. Scoped to .userform-layout so the board-view mobile lock is unchanged. Removed on destroy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f9b5de0e8e
commit
4a7df37459
2 files changed
+31
No files matched your search
@@ -52,6 +52,13 @@ Template.userFormsLayout.onRendered(() => {
|
||||
// gesture works the same as on the board swimlanes view.
|
||||
enablePageDragscroll();
|
||||
|
||||
// Mark the auth pages so CSS can let <body> scroll as a normal document.
|
||||
// body.mobile-mode locks <body> to position:fixed/100vh (an iOS board-view
|
||||
// anti-bounce fix); without an inner #content scroller that traps these pages
|
||||
// at viewport height, hiding the sign-up link / language selector below the
|
||||
// form (and they sit behind the on-screen keyboard). See userForm.css.
|
||||
document.body.classList.add('userform-layout');
|
||||
|
||||
Meteor.call('getAuthenticationsEnabled', (_, result) => {
|
||||
let enabledAuthenticationMethods = ['password']; // we show/hide this based on isPasswordLoginEnabled
|
||||
|
||||
@@ -200,6 +207,7 @@ Template.userFormsLayout.onDestroyed(() => {
|
||||
// Stop drag-scrolling <body> after leaving login / register (e.g. once logged
|
||||
// in) so other layouts keep their normal behaviour.
|
||||
disablePageDragscroll();
|
||||
document.body.classList.remove('userform-layout');
|
||||
});
|
||||
|
||||
Template.userFormsLayout.helpers({
|
||||
|
||||
@@ -113,6 +113,21 @@ body.mobile-mode .auth-layout .auth-dialog .at-form .password-input-container .p
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
/* Auth pages (login / register) must scroll as a normal document on mobile so
|
||||
the content below the form — the sign-up / sign-in link, legal notice and
|
||||
language selector — is reachable, including when the on-screen keyboard is
|
||||
open. body.mobile-mode otherwise locks <body> to position:fixed + 100vh (an
|
||||
iOS board-view anti-bounce fix); the auth layout has no inner #content
|
||||
scroller, so that lock traps the page at viewport height and the on-screen
|
||||
keyboard hides the bottom. .userform-layout is added by userFormsLayout while
|
||||
these pages are mounted (see layouts.js). */
|
||||
body.mobile-mode.userform-layout {
|
||||
position: static !important;
|
||||
height: auto !important;
|
||||
min-height: 100vh;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.auth-layout {
|
||||
width: 100%;
|
||||
@@ -120,6 +135,14 @@ body.mobile-mode .auth-layout .auth-dialog .at-form .password-input-container .p
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
/* Let the auth layout/dialog grow to their content instead of being pinned to
|
||||
the viewport height, so everything below the form scrolls into view. */
|
||||
body.userform-layout .auth-layout {
|
||||
height: auto;
|
||||
}
|
||||
body.userform-layout .auth-layout .auth-dialog {
|
||||
height: auto;
|
||||
}
|
||||
.auth-layout .at-form-landing-logo {
|
||||
width: 125px;
|
||||
position: absolute;
|
||||
|
||||
Reference in new issue
Block a user