-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
screen bounces when focusing inputs in a scrolling ion-content (web) #9346
Comments
Hello @macool ! Thanks for opening an issue with us! Would you mind trying the latest nightly (npm install ionic-angular@nightly --save) and trying again? I am not able to reproduce this with the latest nightly |
This issue was moved to ionic-team/ionic-v1#63 |
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. |
Ionic version:
[x] 1.x
[ ] 2.x
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Switching betwen inputs inside an
ion-content
causes screen to awfully "bump". See example:Expected behavior:
js scrolling helps me showing the form in the right place - however the screen shouldn't be bumping that way
Steps to reproduce:
switch between inputs inside a scrolling ion-content
http://plnkr.co/edit/FTIXiTalIrkNyYfwl25H?p=preview
unfortunately I can only see the issue in actual mobile devices via web - not in desktop web
-->
Related code:
Other information:
I managed to workaround the native version by disabling the keyboard scrolling using keyboard plugin. However been fighting with the web version and there seem to be some discussion around this already. eg #2256 & #2285 seem to be related.
I haven't had much time myself to look at the details but it all seems to be happening here: https://github.com/driftyco/ionic/blob/v1.3.2/js/utils/keyboard.js#L143 where we debounce the focus for the current input. While placing some debuggers I realised I can patch it by wrapping it inside a function, so my best guess is it's losing the context and therefore performing the focusing several times:
and it works like charm:
Ionic info:
The text was updated successfully, but these errors were encountered: