ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

issue in auto scroll feature added in RC3

Open PrithiviRajG opened this issue 10 years ago • 14 comments

Short description of the problem:

In RC3 version, screen automatically gets scrolled when we are changing the focus from one field to the another. it might be nice for longer forms, but I have only two fields (Login and Registration) when I focus to password field, user Id field is scrolled up and only the password field is visible. Before it was working fine. PFB the screen print

What behavior are you expecting?

No need to scroll for smaller forms or Ionic can scroll such that the focus text box can be little above the keypad.

Steps to reproduce: can run any form and test it on android device

<form [formGroup]="loginForm" (ngSubmit)="signIn()">
                <ion-list class="login-data">
                    <ion-item [class.error]="!userId.valid && userId.touched">
                        <ion-label fixed icon-only>
                            <ion-icon name="person"></ion-icon>
                        </ion-label>
                        <!--<ion-label floating>Username</ion-label>-->
                        <ion-input type="text" placeholder="Username" formControlName="userId" value="ab"></ion-input>
                    </ion-item>

                    <ion-item [class.error]="!password.valid && password.touched">
                        <ion-label fixed icon-only>
                            <ion-icon name="lock"></ion-icon>
                        </ion-label>
                        <!--<ion-label floating>Password</ion-label>-->
                        <ion-input type=password placeholder="Password" formControlName="password"
                                   value="abd12"></ion-input>
                    </ion-item>
                </ion-list>
            </form>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) https://forum.ionicframework.com/t/ion-input-auto-scrolls-on-focus-in-rc3/70571

screenshot_2016-11-18-14-47-46

Which Ionic Version? 2.0.0-rc.3

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.3 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 OS: Windows 7 SP1 Node Version: v6.7.0

PrithiviRajG avatar Nov 18 '16 09:11 PrithiviRajG

I am facing the same issue in RC3. Is there any way to stop the auto scrolling of ion-input.

AishApp avatar Nov 18 '16 09:11 AishApp

I think ion-input should have an option to disable auto scroll

Something like that:

<ion-input no-auto-scroll></ion-input>

cleever avatar Nov 18 '16 11:11 cleever

Scrolling under the header should be fixed from what's in master. We'll keep this open and keep testing it, thanks. cc @jgw96

adamdbradley avatar Nov 18 '16 22:11 adamdbradley

@adamdbradley my form contain username and password field but the password goes way too up below the header , are you referencing the same issue.

steps to reproduce

  • click on username -keyboard will show up
  • click on password - pass will go up to the header.

jtushar53 avatar Nov 19 '16 08:11 jtushar53

Hello @jtushar53 would you mind trying the latest nightly (npm install ionic-angular@nightly --save) and seeing if that fixes the issue for you? Thanks!

jgw96 avatar Dec 01 '16 15:12 jgw96

hi @jgw96 , yes working perfect on chrome desktop dev tools but different behaviour on dev tools and device current behaviour on 2.0.0-rc.3-201611302233 on chrome dev tools

  1. click on first field (Username) - page scrolls up
  2. click on second field (Password) - page doesn't scroll and justifies above keyboard.

current behaviour on 2.0.0-rc.3-201611302233 on device

  1. click on first field (Username) - page scrolls up
  2. click on second field (Password) - page scroll gently which is also not close from header

jtushar53 avatar Dec 01 '16 17:12 jtushar53

Hello @jtushar53 ! Unfortunately I cannot reproduce this issue. Could you post a screenshot of the issue you are seeing?

jgw96 avatar Dec 09 '16 21:12 jgw96

Hey @jtushar53 ! Thanks for opening an issue with us! We just released RC4 today, would you mind updating and trying that?

jgw96 avatar Dec 15 '16 22:12 jgw96

hi @jgw96 in RC4 also we are facing the same issue, I updated my App to RC4 and I am able to the same problem, on focus of text fields, they automatically scrolling up and give very poor look and feel. Please find below the screen print

screen print 1 screen print 2 screen print 3

Ionic Info:

 ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.7.0
Xcode version: Not installed

PrithiviRajG avatar Dec 26 '16 11:12 PrithiviRajG

Hi!, I'm facing the same issue on RC5.

Ionic Info:

 ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.9.4
Xcode version: Not installed

datencia avatar Jan 13 '17 07:01 datencia

one solution that worked for me is to add below lines of code in app.module.ts. But i am not sure that this is the proper solution as there is no documentation found on this.

imports: [
    IonicModule.forRoot(MyApp, {
      scrollAssist: false
    })
  ],

AishApp avatar Jan 13 '17 10:01 AishApp

Facing the same issue, scrollAssist: false did help

gadld avatar Jan 23 '17 04:01 gadld

Hello all! So scrollAssist is on by default to help with issues around inputs being hidden and not popping into the view until you start typing. We are constantly working on making this better, in fact 2.0 stable that was released today has a fix related to this. If you prefer the older behavior of inputs behind hidden and then popping into view when you start typing you can set scrollAssist to false as @AishApp mentioned above. Thanks for using Ionic!

jgw96 avatar Jan 25 '17 19:01 jgw96

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.

ionitron-bot[bot] avatar Sep 04 '18 11:09 ionitron-bot[bot]