4
预定义的手机功能:当我们专注于任何输入时,它将自动滚动到移动设备中的输入。当手机输入焦点时,无法滚动输入离子应用程序
问题:由于水平滚动也在那里,所以当我点击移动设备上的输入时,它不会自动滚动到输入和输入隐藏在键盘后面。
我试过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>
控制器
$ionicScrollDelegate.$getByHandle('nomineeDiv').scrollBy(580, 140, true);
可你只是验证我做到了那是你的方式或不http://keepnote.cc/3331328 –
确定。只需检查设备。我点击上一个输入页面向上滚动并聚焦。该文本框的键盘顶端.http://prntscr.com/entaf1 –
我检查它像打开应用程序滚动垂直,并单击上一个窗体文本框键盘打开,但页面滚动,并开始正确的?那是你面临的问题? –