小程序
小游戏
企业微信
微信支付
扫描小程序码分享
在安卓机上textarea设置了wx:if="true"时候自动聚焦并且拉起键盘,开始都正常,但是多点击几次就不能获取焦点,也不能拉起键盘,甚至点击textarea都没任何反应,里面原有的内容会随着页面滚动儿滚动,ios是正常的
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
<
view
wx:if
=
"{{keyShows}}"
class
'warpper-textCon'
style
"bottom:{{keyHeights-2}}px"
>
textarea
'textCon'
show-confirm-bar
'{{false}}'
value
'{{value}}'
auto-focus
"{{true}}"
bindinput
'messageInput'
bindblur
'noShow'
bindfocus
'bindfocusHeigth'
adjust-position
focus
'{{true}}'
></
form
bindsubmit
"submit"
report-submit
'true'
data-submit
'{{!isregister}}'
button
data-type
'2'
'clear'
open-type
"{{unionname?'':'getUserInfo'}}"
bindgetuserinfo
'bindgetuserinfo'
form-type
'textOk'
>发表评论</
</
'messInput'
id
'position'
"{{IsDiscuss==1}}"
image
src
'{{head}}'
mode
'aspectFill'
'/dist/cardimgs/photosy.png'
wx:else></
type
'text'
catchtap
'tirgger'
>简单说说...</
js部分
tirgger(){
this.setData({
keyShows: true,
})
console.log('是实打实的')
},
//获取键盘高度
bindfocusHeigth(e){
keyHeights: Number(e.detail.height)
});
console.log(e.detail.height)
noShow(){
keyShows: false,
value: this.data.messageInput
console.log(this.data.keyShows)
//输入框事件
messageInput: function(e) {
if (e.detail.value == '') {
disabled: true
} else {
disabled: false
}
messageInput: e.detail.value
安卓机的问题 ios没问题
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
麻烦按照要求来补全信息
你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
'copyMain'
'copyTitle'
text
>智能地址填写</
switch
checked
"{{switchFlag}}"
bindchange
"switch1Change"
/>
<!-- 智能地址框 -->
wx-if
hidden
"{{!searchMaskFlag}}"
placeholder
"粘贴整段地址,自动识别姓名、电话和地址例"
'{{copytext}}'
'copytext'
'copytextH'
"sub"
"{{!!copytext}}"
'noNull'
bindtap
'subCopy'
>智能填写</
安卓机 华为 vivo部分机型 都出现了这种情况
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
<
view
wx:if
=
"{{keyShows}}"
class
=
'warpper-textCon'
style
=
"bottom:{{keyHeights-2}}px"
>
<
textarea
class
=
'textCon'
show-confirm-bar
=
'{{false}}'
value
=
'{{value}}'
auto-focus
=
"{{true}}"
bindinput
=
'messageInput'
bindblur
=
'noShow'
bindfocus
=
'bindfocusHeigth'
adjust-position
=
'{{false}}'
focus
=
'{{true}}'
></
textarea
>
<
form
bindsubmit
=
"submit"
report-submit
=
'true'
data-submit
=
'{{!isregister}}'
>
<
button
data-type
=
'2'
class
=
'clear'
open-type
=
"{{unionname?'':'getUserInfo'}}"
bindgetuserinfo
=
'bindgetuserinfo'
form-type
=
"submit"
>
<
view
class
=
'textOk'
>发表评论</
view
>
</
button
>
</
form
>
</
view
>
<
view
class
=
'messInput'
id
=
'position'
wx:if
=
"{{IsDiscuss==1}}"
>
<
image
src
=
'{{head}}'
mode
=
'aspectFill'
wx:if
=
'{{head}}'
></
image
>
<
image
src
=
'/dist/cardimgs/photosy.png'
mode
=
'aspectFill'
wx:else></
image
>
<
view
type
=
'text'
catchtap
=
'tirgger'
>简单说说...</
view
>
</
view
>
js部分
tirgger(){
this.setData({
keyShows: true,
})
console.log('是实打实的')
},
//获取键盘高度
bindfocusHeigth(e){
this.setData({
keyHeights: Number(e.detail.height)
});
console.log(e.detail.height)
},
noShow(){
this.setData({
keyShows: false,
value: this.data.messageInput
})
console.log(this.data.keyShows)
},
//输入框事件
messageInput: function(e) {
if (e.detail.value == '') {
this.setData({
disabled: true
})
} else {
this.setData({
disabled: false
})
}
this.setData({
messageInput: e.detail.value
})
},
安卓机的问题 ios没问题
麻烦按照要求来补全信息
你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
<
view
class
=
'copyMain'
>
<
view
class
=
'copyTitle'
>
<
text
>智能地址填写</
text
>
<
switch
checked
=
"{{switchFlag}}"
bindchange
=
"switch1Change"
/>
</
view
>
<!-- 智能地址框 -->
<
textarea
wx-if
=
"{{switchFlag}}"
hidden
=
"{{!searchMaskFlag}}"
placeholder
=
"粘贴整段地址,自动识别姓名、电话和地址例"
value
=
'{{copytext}}'
class
=
'copytext'
bindinput
=
'copytextH'
/>
<
view
class
=
"sub"
wx-if
=
"{{switchFlag}}"
>
<
text
wx-if
=
"{{!!copytext}}"
class
=
'noNull'
bindtap
=
'subCopy'
>智能填写</
text
>
</
view
>
</
view
>
安卓机 华为 vivo部分机型 都出现了这种情况