Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensureSignedIn seems to scroll registration page on meteoric and small screens #8

Open
yauh opened this issue Jun 26, 2015 · 0 comments

Comments

@yauh
Copy link

yauh commented Jun 26, 2015

I have a custom welcome page that is shown when users hit the / route, which is using the ensuredSignedIn plugin with Iron.Router.

When accessing the page on an iPhone 6 Plus all is well:

Login on iPhone 6+

However, accessing the exact same page on an iPhone 4s scrolls down to the mustBeLoggedIn message:

Login on iPhone 4s

On a Nexus 5 (Android) I can see it also scrolls:

Login on Nexus 5

How can I ensure that the page does not scroll to the middle for the registration on smaller screens? What causes this scrolling?

Router.plugin('ensureSignedIn', {
  only: ['home', 'profile']
});

AccountsTemplates.configureRoute( 'ensureSignedIn', {
  template: 'welcome'
} );

AccountsTemplates.configure( {
  // Behaviour
  forbidClientAccountCreation: false,
  overrideLoginErrors: true,
  defaultState: 'signUp',

  // Appearance
  showAddRemoveServices: false,
  showForgotPasswordLink: true,
  showLabels: true,
  showPlaceholders: true,
  showResendVerificationEmailLink: false,

  // Redirects
  homeRoutePath: '/',
  redirectTimeout: 4000,

  hideSignInLink: false,
  texts: {
    errors: {
      mustBeLoggedIn: 'Create an account with your email address',
      }
  }
} );

The template looks like this:

<template name="welcome">
    {{#contentFor "headerTitle"}}
        <h1 class="title">Welcome to my app</h1>
    {{/contentFor}}
    {{#ionContent}}
            <h1 class="padding">Howdy, stranger!</h1>

            <div class="card">
                <div class="item item-text-wrap">
                    Sign up and start playing!
                </div>
            </div>
            {{>atForm}}
            <div class="card">
                <div class="item item-text-wrap">
                    Some text.
                </div>
            </div>
    {{/ionContent}}
</template>

Package Versions (Meteor 1.1.0.2):

PS: I have a feeling it might have to do with a focus on the first input field that happens for some reason...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant