textarea 组件查看文档,有如下描述
在开发者工具中,进行多个基础库版本的测试, event.detail 中无height字段。
这是官方已经确认了的问题了吗?还是我哪里有问题。
谢谢
下面是我测试的代码:
<view class="container"> <view class="msgs"> <view class="msg-item">12341234</view> <view class="msg-item">asdfasdf</view> </view> <view class="input-box"> <textarea fixed="true" maxlength="-1" bindfocus="onTextareaFocus" adjust-position="{{ false }}" show-confirm-bar="{{ false }}"> </textarea> </view></view> |
Page({ onTextareaFocus: function (e) { console.log(e); }}); |
position: fixed; bottom: 0; left: 0; right: 0; background: red;} |
------------------------ 更新 ------------------------
经过进一步测试,发现是模拟器的问题,真机是没有问题的,打扰了。

input的height也是0,我们对齐一下吧
真机中测试有这个字段吗?
真机有的,模拟器没有。
开发工具模拟器没有弹起键盘呀
input 也没有弹起键盘,但是会有 event.detail.height 的值
咦,input是有的,我确认一下
这是我通过开发工具打印的信息 ,可以看到 detail 里只有 value 字段