ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.89k stars 13.52k forks source link

bug (ion-item | iOS): focus on input box translate the value on Y-axis #21964

Closed indraraj26 closed 4 years ago

indraraj26 commented 4 years ago

Bug Report

Ionic version:

[ ] 4.x [x] 5.x

Current behavior:

When you focus on input it translate the value in y then translate 0 Test in iOS REPO: https://github.com/indraraj26/ionic5-starter-tabs-sidemenu/tree/input-translatey Expected behavior:

It should not translate or move value

Steps to reproduce:

Related code:

Focus on first ion-input which is wrapped into ion-item image

<form #f="ngForm" (ngSubmit)="onSubmit(f)">
        <!-- <div>test</div> -->
        <!-- if you uncomment above it will not translate value -->
        <ion-row>
            <ion-col>
                <ion-item>
                    <ion-label position="stacked" class="phone-label"
                        >your phone no.</ion-label
                    >
                    <ion-input
                        [(ngModel)]="loginDetails.phone_no"
                        #phoneNo="ngModel"
                        name="phone_no"
                        class="phone-no-input"
                    ></ion-input>
                </ion-item>
            </ion-col>
        </ion-row>
        <ion-row>
            <ion-text>VS</ion-text>
        </ion-row>
        <ion-row>
            <ion-text>Without Ion-item</ion-text>
        </ion-row>
        <ion-row>
            <ion-col>
                <ion-label position="stacked" class="phone-label"
                    >your phone no.</ion-label
                >
                <ion-input
                    [(ngModel)]="loginDetails.phone_no"
                    #phoneNo="ngModel"
                    name="phone_no"
                    class="phone-no-input"
                ></ion-input>
            </ion-col>
        </ion-row>
    </form>

Other information:

Ionic info:

ionic info

Ionic:

   Ionic CLI                     : 6.11.0 (C:\Users\indra26\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.3.1
   @angular-devkit/build-angular : 0.1000.7
   @angular-devkit/schematics    : 10.0.7
   @angular/cli                  : 10.0.7
   @ionic/angular-toolkit        : 2.3.2

Utility:

   cordova-res : 0.15.1
   native-run  : 1.0.0

System:

   NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.9.0
   OS     : Windows 10
liamdebeasi commented 4 years ago

Thanks for the issue. What version of iOS are you testing this on? I am not able to reproduce this behavior.

indraraj26 commented 4 years ago

anyway i am testing on browser with mode iOS, Since i am in development phase and working on android for now, I will re-open this later if it is same in real-device too.

ionitron-bot[bot] commented 3 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.