I've a view with textangular as an element. On Android(I tested), if the keyboard is opened, the view is not scrolling up to prevent the editor from getting behind the keyboard. I installed the Keyboard plugin com.ionic.keyboard.
我有一个textangular作为元素的视图。在Android(我测试过)上,如果打开键盘,视图不会向上滚动以防止编辑器进入键盘。我安装了Keyboard插件com.ionic.keyboard。
This is the structure of the page:
这是页面的结构:
<ion-view id="newblogview">
<ion-nav-buttons side="left">
...
</ion-nav-buttons>
<ion-content scroll="true" overflow-scroll="true" class="has-header" delegate-handle="mainScroll">
<iframe data-tap-disabled="true" style="width: 100%; min-height: 100%" src="./templates/blog/html/blog-editor.html" name="blogeditor" id="blogeditor"></iframe>
</ion-content>
</ion-view>
it's not moving up when the keyboard is opened by focusing on the input. I've tried android:windowSoftInputMode="adjustPan" and also "adjustResize" And also I've tried native.keyboardshow event to call $ionicScrollDelegate.scrollBottom(true);
通过聚焦输入打开键盘时,它不会向上移动。我试过android:windowSoftInputMode =“adjustPan”以及“adjustResize”而且我也尝试过native.keyboardshow事件来调用$ ionicScrollDelegate.scrollBottom(true);
I think we've Keyboard attach directive for footer, but I can't place text editor in the footer. Does ionic framework support adjusting ion content to keyboard show/hide? is this feature is not supported yet in framework or am I missing something.
我认为我们已经为页脚添加了键盘附加指令,但是我无法在页脚中放置文本编辑器。离子框架是否支持调整键盘显示/隐藏的离子含量?是否在框架中不支持此功能,或者我错过了什么。
This question is similar to another thread, but there is no accepted answer.
这个问题类似于另一个主题,但没有接受的答案。
Please help. -Prakash.
请帮忙。 -Prakash。
1 个解决方案
#1
0
You can add this to your html component
您可以将其添加到您的html组件
<div delegate-handle="toThisPosition" ng-click="GoHere()"> </div>
and adding this to the ng-click method GoHere() in your controller:
并将其添加到控制器中的ng-click方法GoHere():
GoHere() {
$ionicScrollDelegate.$getByHandle('toThisPosition').scrollBottom(true);
}
#1
0
You can add this to your html component
您可以将其添加到您的html组件
<div delegate-handle="toThisPosition" ng-click="GoHere()"> </div>
and adding this to the ng-click method GoHere() in your controller:
并将其添加到控制器中的ng-click方法GoHere():
GoHere() {
$ionicScrollDelegate.$getByHandle('toThisPosition').scrollBottom(true);
}