输入焦点向上滚动键盘上方

时间:2016-10-05 13:20:12

标签: cordova ionic-framework keyboard cordova-plugins ionic2

当我将焦点定位在低于键盘高度的位置时,当键入键盘时,键盘会隐藏输入

当我对输入进行聚焦时,我希望输入能够在键盘上方滚动。有人建议在app.ts中调用此方法 enter image description here

declare var cordova:any;
declare var window:any;

platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      StatusBar.styleDefault();

      if (window.cordova && window.cordova.plugins.Keyboard) {
        // This requires installation of https://github.com/driftyco/ionic-plugin-keyboard
        // and can only affect native compiled Ionic2 apps (not webserved).
        cordova.plugins.Keyboard.disableScroll(false);
      }
    });

在我的控制台中显示cordova对象,但当我专注于输入页面向上滚动时没有工作,任何解决方案我都被卡在上面

我提到link

Cordova CLI:6.2.0 Ionic Framework版本:2.0.0-beta.11

Ionic CLI版本:2.0.0-beta.37

Ionic App Lib版本:2.0.0-beta.20

节点版本:v6.2.1

0 个答案:

没有答案