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

[Ionic 2] Tapping on disabled/readonly ion-input scrolls without showing the keyboard. Gif attached.

Open fuggfuggfugg opened this issue 10 years ago • 8 comments

Not sure if this is a bug.

Short description of the problem:

I have a profile page where fields are setup as readonly & disabled for now but will be editable in the future.

What behavior are you expecting?

Tapping on the disabled input fields adds scrolling. bug

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

Your system information:

Cordova CLI: 6.3.1 Ionic Framework Version: 2.0.0-rc.1 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 ios-deploy version: 1.9.0 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v6.7.0 Xcode version: Xcode 8.0 Build version 8A218a

fuggfuggfugg avatar Nov 07 '16 16:11 fuggfuggfugg

Hello, thanks for using Ionic! Does this issue also happen on an Android device running the same app? Also, if you add this:

IonicModule.forRoot(MyApp, {
      scrollAssist: false
}) ;
``` to your `app.module.ts` file does it still happen? Thanks!

jgw96 avatar Nov 09 '16 16:11 jgw96

Sorry for the late response. The scrollAssist seems to have done the trick on ionic view and emulator at least. I'll test on android and report back soon.

btw what is the difference between scrollAssist and autoFocusAssist?

fuggfuggfugg avatar Nov 10 '16 14:11 fuggfuggfugg

@adamdbradley just tested this with the scroll branch and it seems to still be an issue.

jgw96 avatar Nov 28 '16 17:11 jgw96

It doesn't seem that scrollAssist or autoFocusAssist are listed in the config API docs. Are these referred to somewhere else in the documentation?

j3gb3rt avatar Dec 01 '16 16:12 j3gb3rt

Just updated to RC 5 - I have a readonly input and this issue is still present. Ion-scroll is adding margin-bottom to make room for the keyboard - but none appears.

haydenJogs92 avatar Jan 13 '17 19:01 haydenJogs92

@haydenJogs92 Same here! This is also a bug. I tried to use a readonly input field and bind the (click) handler on it. When I tap the field on emulator, the screen gets scrolled a bit and nothing happens. I have to click a second time in order to trigger the click event. I also tried disabled=true, it worked. But I don't want to gray out the text displayed in the input field. I think for now, I've got to set it as disabled and use extra CSS styles to change the text color.

==== Edit =====

IonicModule.forRoot(MyApp, { scrollAssist: false }) ; This works for me and I haven't found any fallback. Thanks.

charIeszhao avatar Apr 18 '17 06:04 charIeszhao

This seems to be still an issue, at least for me. Adding this:

IonicModule.forRoot(MyApp, {
scrollAssist: false
}) ;

Disables it for all Inputs, but I want this to happen only for "readonly".

Ionic info:

    @ionic/cli-plugin-proxy : 1.4.12
    @ionic/cli-utils        : 1.13.0
    ionic (Ionic CLI)       : 3.13.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.3.0 ios
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node : v6.11.3
    npm  : 3.10.10
    OS   : Windows 10

Misc:

    backend : pro

felix9607 avatar Dec 12 '17 07:12 felix9607

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 01 '18 14:09 ionitron-bot[bot]