ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
610 stars 274 forks source link

Android switching between input fields #156

Open PerfectionVR opened 8 years ago

PerfectionVR commented 8 years ago

Problem: When going from any input, then tapping anywhere on the screen (except for the other input field) and then tapping the second input field, which could be either one. The keyboard opens and then closes. Assuming that keyboard some show() function is called before the animation finishes and hide() is called.

Issue percieved on Android Phone 5.1.1 and Android Tablet 4.2.1 but works as expected on iOS and strangely WP aswell. See the following code snippet;

<ion-content>
        <div class="container">
            <div class="content">
                <div class="text-center">
                    <img src="img/logo.jpg" class="logo" />
                </div>
                <label class="item item-input">
                    <span class="input-label">Gebruikersnaam</span>
                    <input type="text" ng-model="login.user.username" required="required" maxlength="55" autocorrect="off" autocapitalize="none">
                </label>
                <label class="item item-input">
                    <span class="input-label">Wachtwoord</span>
                    <input type="password" ng-model="login.user.password" required="required" maxlength="55" autocorrect="off" autocapitalize="none">
                </label>
                <ion-toggle ng-model="login.user.remind">
                    Onthoud logingegevens
                </ion-toggle>
                <button class="button button-block button-positive" nav-clear ng-click="login.signIn(login.user)">Inloggen</button>
            </div>
        </div>
    </ion-content>

Steps to reproduce: (Do the following taps fast after another)

I have no idea how to fix this on my end.

P.S. Notably, the keyboard doesn't seem to "scroll" to the input field while other devices do.

PerfectionVR commented 8 years ago

This problem happens when you set fullscreen to true. Setting it to false fixes this. When using the statusbar plugin, you set your fullscreen to false and hide your statusbar, the problem is there again. Likely these two things do the same thing but that might help.