当专注于手机中的输入时,无法滚动到离子应用程序中的输入

Gau*_*rav 6 html css css3 angularjs ionic-framework

预定义的电话功能:当我们专注于任何输入时,它将自动滚动到移动设备中的该输入.

问题:它不能在我的离子应用程序中工作,因为水平滚动也在那里,所以当我点击移动设备中的输入时,它不会自动滚动到该输入并且输入隐藏在键盘后面.

我试过delegate-handle这个,但它不起作用.

同样的 Plunker

HTML

<ion-scroll direction="xy" class="scroll" delegate-handle="nomineeDiv">
    <div class="table-row" ng-repeat="data in nominee"><!-- Multiple div show horizontally -->
        <form name="data.formName">
            <!-- Long vertical form
            .....
            .....
            after 4 input tags --> 
            <input type="text" name="something"/>
            <!-- Need to scroll to input when input focused -->
        </form>
    </div>
</ion-scroll>
Run Code Online (Sandbox Code Playgroud)

调节器

$ionicScrollDelegate.$getByHandle('nomineeDiv').scrollBy(580, 140, true);
Run Code Online (Sandbox Code Playgroud)

Utk*_*bey 5

Solution.1您可以尝试创建一个双击事件,将其位置更改为静态吗?这可能会使您的页脚升至最高位置。

Solution.2使用CSS overflow-y: scroll;的表单上。

Solution.3您也可以尝试删除<preference name="fullscreen" value="true" />config.xml文件中的首选项。

我遇到了同样的问题,并使用Solution.2解决了它。

这是链接- 键盘隐藏输入问题