ionic 3 -Keyboard pushes the whole screen up

不羁岁月 提交于 2020-01-04 14:14:28

问题


I build ionic 3 app. I have inputs field and when I press on them to begin to type anything the screen changed..

before

when I press on any input field the screen changed(it's test also in real device)


回答1:


You can fix this problem by adding this style to app.scss:

    ion-grid {
      min-height: 100%;
     }

The keyboard resizes Ionic's grid system if you didn't define its minimum height.




回答2:


Take a look at the native keyboard to prevent the keyboard from pushing things up.

keyboard.disableScroll(bool);

Ionic Native Keyboard Documentation



来源:https://stackoverflow.com/questions/46436894/ionic-3-keyboard-pushes-the-whole-screen-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!