问题:内容为一条消息或少条消息时,内容会上推为空,内容多时不影响。
- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
.js代码:
//输入框焦点键盘高度
textFocus: function(e) {
let keyBarHeight = e.detail.height;
if (that.data.isMi) {
that.setData({
keyBarHeight: keyBarHeight
});
} else if (that.data.isMi6x) {
that.setData({
keyBarHeight: keyBarHeight + 100
});
};
},
.wxml代码:
<!–编写消息–>
<form bindsubmit=“bindConfirmBtn”>
<view class=‘speak’ style=‘bottom:{{keyBarHeight + “px;”}}’>
<image class=‘photo’ src=’/images/im_photo.png’ catchtap=‘selPhoto’></image>
<input type=‘text’ class=‘input’ name=“textarea” placeholder=‘输入内容’ cursor-spacing=’{{iPhone ? “14” : “10”}}’ confirm-type=‘send’ confirm-hold=‘true’ value=’{{msgContent}}’ adjust-position=’{{true}}’ bindfocus=‘textFocus’ bindblur=‘textBlur’ bindconfirm=“bindConfirm”></input>
<button form-type=“submit” class=‘sub’>发送</button>
</view>
</form>