小程序
小游戏
企业微信
微信支付
扫描小程序码分享
头部导航栏设置了"navigationStyle":"custom",导致input调起键盘页面会上推 这个问题怎么解决啊?哪个大佬可以帮忙看看?
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
能不能不推定位的元素,比如fixed,我用的自定义头部也需要adjust-position="{{false}}"
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<input adjust-position="{{false}}" />必须要用{{}}括起来
你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
微信版本6.73,手机的iPhoneX,
app.json里面"navigationStyle":"custom",
wxml:
<view class="comment-button" hidden='{{!hidden}}' style='bottom:{{bottom}}px'>
<view class="button" bindtap="toComment">
<image class="comment-icon" src="../../images/comment-icon.png"></image>
评论
</view>
<input class="mask" bindfocus='openKeyboard' adjust-position="false" cursor-spacing="10"></input>
wxss:
.comment-button, .button, .comment-area {
width: 100%;
height: 50px;
background: #fff;
font-size: 15px;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
}
js:
openKeyboard:function(e){
console.log(e.detail.height)
this.setData({
bottom: e.detail.height,
hidden: false
})
},
麻烦按照文档指引来提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
https://developers.weixin.qq.com/s/G84jHSmu7v3v
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
能不能不推定位的元素,比如fixed,我用的自定义头部也需要adjust-position="{{false}}"
<input adjust-position="{{false}}" />必须要用{{}}括起来
你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
微信版本6.73,手机的iPhoneX,
app.json里面"navigationStyle":"custom",
wxml:
<view class="comment-button" hidden='{{!hidden}}' style='bottom:{{bottom}}px'>
<view class="button" bindtap="toComment">
<image class="comment-icon" src="../../images/comment-icon.png"></image>
评论
</view>
<input class="mask" bindfocus='openKeyboard' adjust-position="false" cursor-spacing="10"></input>
</view>
wxss:
.comment-button, .button, .comment-area {
width: 100%;
height: 50px;
background: #fff;
font-size: 15px;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
}
js:
openKeyboard:function(e){
console.log(e.detail.height)
this.setData({
bottom: e.detail.height,
hidden: false
})
},
麻烦按照文档指引来提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
https://developers.weixin.qq.com/s/G84jHSmu7v3v