收藏
回答

调起键盘页面上推问题

头部导航栏设置了"navigationStyle":"custom",导致input调起键盘页面会上推  这个问题怎么解决啊?哪个大佬可以帮忙看看? 


回答关注问题邀请回答
收藏

3 个回答

  • 小程序运营专员 - cunjin
    小程序运营专员 - cunjin
    2018-12-17

    <input adjust-position="{{false}}" />必须要用{{}}括起来

    2018-12-17
    有用
    回复 1
    • 南北
      南北
      2019-10-14
      页面不上推了,但是input光标消失了,placeholder也不显示,输入内容也看不到,键盘收起之后才可以看到输入的内容
      2019-10-14
      回复
  • GJ
    GJ
    2019-08-29

    能不能不推定位的元素,比如fixed,我用的自定义头部也需要adjust-position="{{false}}"

    2019-08-29
    有用
    回复
  • 疯狂的小辣椒
    疯狂的小辣椒
    2018-11-12

    你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2018-11-12
    有用
    回复 3
    • 2018-11-12

      微信版本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

      })

      },


      2018-11-12
      回复
    • 疯狂的小辣椒
      疯狂的小辣椒
      2018-11-12回复

      麻烦按照文档指引来提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

      2018-11-12
      回复
    • 2018-11-12回复疯狂的小辣椒

      https://developers.weixin.qq.com/s/G84jHSmu7v3v

      2018-11-12
      回复
登录 后发表内容