textarea 在oppo手机 型号:OPPO R7s ColorOS版本 4.4.4中无法获取焦点
这应该是官方的bug,OPPO R7s的 6.6.7版本的微信有这问题,希望官方尽快更新新版本。
我做了一种解决方案:
1、textarea绑定bindtap事件,比如: focus=’{{focus}}’ bindtap=‘changeFocus’
2、changeFocus中,设置focus为true
经用户测试,此方案可行~
<view class=“Evaluation”>
<view class=“li” wx:for="{{Transaction}}" wx:key=“TransactionKey” wx:for-index=“group_idx” >
<view class=“EvaTop”>
<view class=“pj_a”>
<image src="{{item.img_url}}"></image>
</view>
<view class=“pj_b” >
<textarea name=“message” placeholder=“若您对订单有特殊的要求,可在此备注”></textarea>
</view>
</view>
</view>
</view>
.Evaluation{margin:0 auto; overflow:hidden; }
.Evaluation .li{ border-bottom:1rpx solid #e4e4e4; width:auto; padding: 20rpx 20rpx 0; overflow:hidden; margin-bottom:20rpx; background:#FFF;}
.Evaluation .li .EvaTop{ width:100%; overflow:hidden; position: relative;}
.Evaluation .li .EvaTop .pj_a{ width:190rpx; position: absolute; left: 0; top: 0}
.Evaluation .li .EvaTop .pj_a image{ border:1px solid #CCC; width:190rpx; height:190rpx}
.Evaluation .li .EvaTop .pj_b{ font-size:24rpx; padding-left: 210rpx;}
.Evaluation .li .EvaTop .pj_b textarea{ width:100%; padding:0; height:190rpx; border:0; font-size:28rpx}
data: {
Transaction: [
{
goods_id: 1952,
img_url: ‘http://shop.xipuw.cn/upload/201711/15/thumb_201711151520266239.jpg’,
Fraction: ‘5’,
ImgUrlList: [],
}, {
goods_id: 1952,
img_url: ‘http://shop.xipuw.cn/upload/201711/15/thumb_201711151520266239.jpg’,
Fraction: ‘5’,
ImgUrlList: [],
}, {
goods_id: 1952,
img_url: ‘http://shop.xipuw.cn/upload/201711/15/thumb_201711151520266239.jpg’,
Fraction: ‘5’,
ImgUrlList: [],
}, {
goods_id: 1952,
img_url: ‘http://shop.xipuw.cn/upload/201711/15/thumb_201711151520266239.jpg’,
Fraction: ‘5’,
ImgUrlList: [],
}
]
},