Skip to content
New issue

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

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

Already on GitHub? # 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: '#',

  // 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">
                    # 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):

  • accounts-base@1.2.0
  • accounts-facebook@1.0.4
  • accounts-oauth@1.1.5
  • accounts-password@1.1.1
  • accounts-twitter@1.0.4
  • accounts-ui@1.1.5
  • accounts-ui-unstyled@1.1.7
  • iron:controller@1.0.8
  • iron:core@1.0.8
  • iron:dynamic-template@1.0.8
  • iron:layout@1.0.8
  • iron:location@1.0.9
  • iron:middleware-stack@1.0.9
  • iron:router@1.0.9
  • meteor@1.1.6
  • meteor-platform@1.2.2
  • meteoric:ionic@0.1.17
  • meteoric:ionic-sass@0.1.9
  • meteoric:ionicons-sass@0.1.6
  • useraccounts:core@1.11.1
  • useraccounts:ionic@1.11.1

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

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

No branches or pull requests

1 participant