Repository navigation
Description
Right now, the way Ionic handles form input can be better. Ionic 1 had awesome defaults for form inputs with regards to keyboard handling, content scrolling, etc. Ionic 2 needs to be made consistent, and more importantly, work properly for form inputs consistently across all platforms (iOS, Android, Windows).
See this repo for the code example which should be run on devices: https://github.com/dylanvdmerwe/ionic2-formtest
Android:
- 1. When selecting an input the entire form content should be scrolled so that the selected item is visible after the keyboard is displayed.
- 2. When the keyboard is hidden, set the scrolling back to it's original position and remove added padding.
- 3. Touching an area that is not an input dismisses the keyboard.
- 4. If the user selects a second input after filling in the first one, the screen should be scrolled to focus on the newly selected input field.
- 5.
Some keyboards have a next, previous and done button. These should be hooked into the form inputs on the page in order to allow the user to cycle through the input options.[unable to test as cannot get a keyboard with next and prev buttons] - 6. Support for autocorrect, autocomplete & autocapitalize and combinations thereof.
iOS:
- 1. When selecting an input the entire form content should be scrolled so that the selected item is visible after the keyboard is displayed.
- 2. When the keyboard is hidden, set the scrolling back to it's original position and remove added padding.
- 3. Touching an area that is not an input dismisses the keyboard.
- 4. If the user selects a second input after filling in the first one, the screen should be scrolled to focus on the newly selected input field.
- 5. Some keyboards have a next, previous and done button. These should be hooked into the form inputs on the page in order to allow the user to cycle through the input options.
- 6. Support for autocorrect, autocomplete & autocapitalize and combinations thereof.
Note that this issue has nothing to do with forms or inputs in a slides component. That would be a seperate consistency check to perform.
Which Ionic Version? 2.x
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4-201604170622
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
OS:
Node Version: v5.7.0
Activity
adamdbradley commentedon Apr 19, 2016
@dylanvdmerwe This is great, thanks for putting this together! As for using the next and previous buttons to tab up and down the inputs, this should be working but maybe something broke recently.
Also goes for auto complete and auto correct, by default they are disabled unless they are specifically added onto the element: https://github.com/driftyco/ionic/blob/2.0/ionic/components/input/input-base.ts#L217
Do you think auto capitalization should be disabled by default too?
dylanvdmerwe commentedon Apr 19, 2016
@adamdbradley
<input>rules?Please note I am testing these on actual devices.
dylanvdmerwe commentedon Apr 20, 2016
@adamdbradley I have updated the items above. Things outstanding are definite reproduceable issues.
kevinATglympse commentedon May 4, 2016
Where are we on Android issue #1? It's totally messing up my app without it.
layton-glympse commentedon May 4, 2016
+1 on Android issue #1 :)
dylanvdmerwe commentedon Jun 4, 2016
Any movement on the items listed in this issue?
manucorporat commentedon Jun 4, 2016
@dylanvdmerwe once next beta is release (beta8) we will focus on fixing issues like this. Excuse the inconveniences
113 remaining items
ykulynych commentedon Mar 21, 2018
Hi guys, I accidentally found that default build has cordova-plugin-ionic-keyboard. And when I replaced it by ionic-plugin-keyboard input bugs have gone.
So my solution is:
cordova plugin rm ionic-keyboard
ionic cordova plugin add ionic-plugin-keyboard
npm install --save @ionic-native/keyboard
edisonmatoso commentedon Mar 28, 2018
+1
emrade commentedon Mar 29, 2018
Vendettall, i tried that but it didn't work!
ykulynych commentedon Mar 30, 2018
mhartington commentedon Mar 30, 2018
If you are still have this issue, please try the newer ionic keyboard plugin
Then set
In the config.xml
krishnatiwarigithub commentedon Apr 4, 2018
Hi,
In the app I am working, everything is working fine. But due to some reason I have to use the inputs within html table. In this case, whenever I am clicking on input it redraws the table, and resets the scroll of table.
Can anyone help here?
ricardoparro commentedon May 28, 2018
also seeing the transform problem happening. It's quite annoying.

Stephane84 commentedon Jun 6, 2018
For scrolling pb, i wrote a hack here : #10629 (comment)
AndrWeisR commentedon Jun 26, 2018
This comment above AbrahamLopez10 commented on Aug 1, 2017 worked perfectly for me, scrolling input fields into view when the Android keyboard pops up.
melwinVincent commentedon Sep 27, 2018
@dylanvdmerwe , @jgw96 @mhartington @Tyler-Darby @manucorporat @adamdbradley
Hi guys, I just created a custom directive to handle this issue on iOS and android platforms for Ionic 2 & 3 applications. Could you please check if this solve all the problems related to this scrolling issue.
I used scroll-into-view-if-needed ponyfill to make this directive
Install ion-input-scroll-into-view directive running the command
npm install ion-input-scroll-into-viewStep-1
Attach the ion-input-scroll-into-view directive to the ion-input or ion-textarea as follows.
<ion-input ion-input-scroll-into-view></ion-input><ion-textarea ion-input-scroll-into-view></ion-textarea>Step-2
You have to import the IonInputScrollIntoViewModule in the module.ts of your parent component as follows
npm link : https://www.npmjs.com/package/ion-input-scroll-into-view
github link : https://github.com/melwinVincent/ion-input-scroll-into-view
ionitron-bot commentedon Nov 1, 2018
Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.
Thank you for using Ionic!
ionitron-bot commentedon Nov 1, 2018
Issue moved to: ionic-team/ionic-v3#47