issue(forms): Input, scrolling, keyboard issues for forms
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:
- [x] 1. When selecting an input the entire form content should be scrolled so that the selected item is visible after the keyboard is displayed.
- [x] 2. When the keyboard is hidden, set the scrolling back to it's original position and remove added padding.
- [x] 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.
- [x] 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]
- [x] 6. Support for autocorrect, autocomplete & autocapitalize and combinations thereof.
iOS:
- [x] 1. When selecting an input the entire form content should be scrolled so that the selected item is visible after the keyboard is displayed.
- [x] 2. When the keyboard is hidden, set the scrolling back to it's original position and remove added padding.
- [x] 3. Touching an area that is not an input dismisses the keyboard.
- [x] 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.
- [x] 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
@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?
@adamdbradley
- I cannot get the keyboard buttons on iOS to shift between the various inputs. They get "confused" and the keyboard eventually just closes. Still need to test on Android when I test with other keyboards that have these buttons.
- Not sure what is best for the defaults for auto complete and auto correct. In iOS for certain keyboard types they are enabled by default - but I think it's best to follow standard
<input>rules? - I will test some permutations for auto complete and auto capitalization a bit later. Note I logged this separately here when the keyboard plugin changed.
Please note I am testing these on actual devices.
@adamdbradley I have updated the items above. Things outstanding are definite reproduceable issues.
Where are we on Android issue #1? It's totally messing up my app without it.
+1 on Android issue #1 :)
Any movement on the items listed in this issue?
@dylanvdmerwe once next beta is release (beta8) we will focus on fixing issues like this. Excuse the inconveniences
+1 on Android issue #1 :)
+1 on Android issue :
. When selecting an input the entire form content should be scrolled so that the selected item is visible after the keyboard is displayed.
This is preventing me from fully porting from ionic1 to ionic 2 . All the best!
This is preventing me from fully porting from ionic1 to ionic 2 .
Same here.
+1 on Android issue #1 Please fix this at the earliest! We started a new app on this, but don't want this bug to be a deal breaker and make us go back to ionic 1!
@adamdbradley, @jgw96 Is there some workaround for now?
Can you please give an update? Hard to demo with this primary functionality not working... Thanks!
I would appreciate an update on this as well. Our ion-input elements are not scrolled into view when focusing them. We tried switching to normal input elements but that causes all kinds of other issues. Thanks!
Hello all! I can assure you that we are working hard on issues like this. Are you all mainly seeing this issue on ios or android? Or does it happen on both?
Happens on android, not sure about ios. Right now, only once I start typing the UI scrolls up to show the input. Ideally, it should happen as soon as focussed and key board pops up.
Hi,
I'm seeing several more issues on iOS on device (haven't checked on Android):
- With floating labels, when clicking an input it often temporarily displays an empty line before the value, causing the value to jump down and the input to expand vertically. With normal labels, the value is instead sometimes temporarily displaced horizontally.
- With floating labels, the caret jumps outside the input when scrolling.
- When using the cordova keyboard plugin and using the accessory bar to navigate between fields, the whole view sometimes jumps. After setting disableScroll(true), the next button works fine but the back button still causes the screen to jump. Not sure if this should be reported there instead?
Thanks for the good work on Ionic, looking forward to having the las kinks ironed out!
Same issue with keyboard and ion-input in Android. Very important issue on all apps with forms!
No update on this critical issue?
any update on this issue?
Would love for this to be looked at in an upcoming RC.