简体   繁体   English

离子iOS输入字段正隐藏在键盘后面

[英]Ionic iOS input field is getting hidden behind keyboard

I am trying to show ion-input at the bottom of page but It is getting hidden behind keyboard when keyboard visible after getting focus on same ion-input. 我试图在页面底部显示离子输入,但是当将焦点放在相同的离子输入上时,当键盘可见时,它就会隐藏在键盘后面。 Ionic page content is not getting scrolled up when keyboard visible. 键盘可见时,离子页面内容不会向上滚动。 Kindly provide any solution. 请提供任何解决方案。

Thanks! 谢谢!

I am facing same issue in my app and I apply below solution to show my input on top of the screen. 我在我的应用程序中遇到了同样的问题,因此我在解决方案下面应用了将输入内容显示在屏幕顶部的方法。

Use overflow property to scroll your content to top. 使用溢出属性将内容滚动到顶部。

overflow-y: scroll;

Also if your app is in fullscreen mode you need to remove ( file : config.xml ) below line. 另外,如果您的应用处于全屏模式,则需要删除以下行( file:config.xml )。

<preference name="fullscreen" value="true" />

still facing any problem you can refer this ionic thread in this thread lots of tricks and tips mentioned to overcome this issue. 仍然面临任何问题,您可以在此线程中引用该离子线程,其中提到了许多技巧和窍门,可以解决该问题。

Thread Link : https://forum.ionicframework.com/t/scroll-to-the-focused-item-input-when-the-keyboard-is-up/422/15 主题链接: https : //forum.ionicframework.com/t/scroll-to-the-focused-item-input-when-the-keyboard-is-up/422/15

Hope this will helps! 希望这会有所帮助!

使用Ionic-Native键盘插件,我们可以禁用此设置。

this.keyboard.disableScroll(false);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM