ionic-framework - Ionic 4 键盘覆盖全部内容
问题描述
当我点击输入键盘时,涵盖了所有内容。我需要像在whatsapp应用程序中一样在键盘上显示输入顶部/向上/上方。
<div *ngSwitchCase="'home'">
<!-- Show list of users -->
<div *ngFor = "let item of data?.slice()?.reverse()">
<!-- When the message type is text the current user sees this-->
<div class="received chat-box" *ngIf="item.uid == user.uid">
<h6>{{item.message}}</h6>
<p>{{item.time.toDate() | date: "dd/MM/yyyy HH:mm a"}}</p>
</div>
<!-- When the message type is text friend sees this-->
<div class="send chat-box" *ngIf="item.uid != user.uid">
<h6>{{item.message}}</h6>
<p>{{item.time.toDate() | date: "dd/MM/yyyy HH:mm a"}}</p>
</div>
</div>
<div class="foo">
<!-- Message text area with attachment -->
<div class="input-wrap">
<ion-textarea autosize
placeholder="Type Message here"
[(ngModel)]="newmessage"
(focusin)="onFocus()"
>
</ion-textarea>
<ion-button fill="clear" slot="end" color="dark" (click)="addmessage()" [disabled]="!newmessage">
<ion-icon src="\assets\icon\send.svg"></ion-icon>
</ion-button>
</div>
</div>
</div>
任何人请告诉任何技巧来解决它。谢谢
解决方案
检查您的 package.json 文件,确保您的 cordova 插件键盘版本为“^2.2.0”或更高版本。你可以简单地删除它
ionic cordova plugin rm cordova-plugin-ionic-keyboard
添加方式
ionic cordova plugin add cordova-plugin-ionic-keyboard@2.2.0
然后它会正常工作,因为我尝试了其他以下版本并且这些版本存在问题。
在 ionic@5.4.6 和 cordova@9.0.0 工作正常
推荐阅读
- apache-spark - 前向填充多列可重用功能代码
- c++ - 在 C++ 中使用 AssocQueryString 获取可执行路径
- c - 将相同的元素从 2 个升序排序的链表复制到一个新链表
- python - 如何让我保存的 mp4 与 plot.show() 的输出完全匹配?
- javascript - UI中的Wordpress插件访问方法
- git - Jenkinsfile 和 env.GIT_BRANCH
- c# - 无法将 System.Linq.IOrderedQuerable 转换为 System.Collection.Generic.List 错误
- ios - Obj-c - 如果没有搜索结果,返回表格视图中的 1 个单元格?
- r - 如何使 R 的 philentropy::distance 函数完全安静?
- sql-server - 无法从 Visual Studio 执行 .sql 文件