离子离子含量不向下滚动时,键盘显示(Android版) [英] Ionic ion-content not scrolling down when keyboard shows (Android)

查看:137
本文介绍了离子离子含量不向下滚动时,键盘显示(Android版)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个登录表单一个简单的观点。在Android上,如果键盘被打开,该内容并非来自获得键盘背后的滚动高达prevent它。

I have a simple view with a login form. On Android, if the keyboard is opened, the content is not scrolling up to prevent it from getting behind the keyboard.

我跟着从文档键盘指令,并阅读了大量的论坛帖子,但我还没有想通了。

I followed the Keyboard instructions from the docs, and read a lot of forum posts, but I haven't figured it out.

我安装了键盘插件 com.ionic.keyboard

这是在网页的结构:

<ion-nav-view>
  <ion-view>
    <ion-content>
       ...<form>..Login form..</form>...
    </ion-content>
  </ion-view>
</ion-nav-view>

如果我把一些额外的虚拟内容的页面,它表明离子含量的确是滚动的。但是,它不动了的键盘时,通过专注于一个输入打开。

If I put some extra dummy content in the page, it shows that ion-content is indeed scrollable. However, it's not moving up when the keyboard is opened by focusing on an input.


  • 离子的版本? 1.0.0-beta.13

  • 是我的应用程序全屏?否

  • 难道我测试,如果键盘插件工作?是

还有什么我有什么关系?

Is there anything else I have to do?

推荐答案

在我的情况下,有一个隐藏输入的键盘时,显示页脚。

In my case there is a footer that hides the input when the keyboard is showing.

github.com/driftyco/ionic/issues/2151 ,虽然它的一被修复的bug似乎它仍然是个问题。

Seeing github.com/driftyco/ionic/issues/2151, although its a closed bug it seems that its still an issue.

要我似乎滚动不知道如何正确计算是否应滚动与否,因为它不会在考虑范围页脚在计算中。如果内容是从第一个地方足够大,那么它知道它反正滚动。

To me it seems that the scrolling doesn't know how to calculate properly whether it should scroll or not, because it doesn't take under account the footer in its calculations. If the content is big enough from the first place then it knows it has to scroll anyway.

我已经结束了使用

$timeout(function() {
    $ionicScrollDelegate.scrollBottom(true);
}, 300);

和添加一些&LT; BR /&gt;对于我的离子含量的底部
有足够的空间,所以它不会对我影响任何东西,bug会导致滚动才能正常工作。

and adding some <br/> at the bottom of my ion-content. There is enough space so it won't effect anything for me, bug will cause the scroll to work properly.

这篇关于离子离子含量不向下滚动时,键盘显示(Android版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆