关于iOS11.0系统 input 输入的值 自动隐藏的问题
发布于 6 年前 作者 xkong 12746 次浏览 来自 问答

在页面上存在5个及一上的input时,  第五和第六个input  在输入值 后失去焦点会自动隐藏 连placeholder都消失,但是在重新获得焦点的时候 输入的值有出现…还有在操作页面上除了input以外的元素,这两个自动隐藏input又会重新出现…

是固定第五第六… 无论是怎么样的input…都一样自动隐藏…

10 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码示例。

我也遇到同样问题,而且设置style="type:digit"这个也无效。请问楼主:你是怎么解决这个问题的?

我也是啊。有时候点击input左上方区域就会这样,在安卓上

目前看起来是ios的渲染问题,dom元素是正常的,你先在bindblur的时候加个will-change:transform 切换,触发渲染

同问,我在iOS 8和Android 4.4.3里也遇到过同样的问题,微信版本都是6.6.1

这个比较乱,或者加个微信hsc-rex看下demo

有回复 我同步在这里

wxml页面 上增加 bindblur=‘BindBUG_value’  和   style=“will-change: {{BUG_value}}”

<input value=’{{contactNumber}}’    bindblur=‘BindBUG_value’  style=“will-change: {{BUG_value}}” name=‘contactNumber’ bindinput=“bindReplaceNumber” type=“number” class=“weui-input-fire” placeholder=“请输入联系人电话” />

页面js

BindBUG_value:function(e){

this.setData({

BUG_value:‘transform’

});

},

实测可行

我也遇到同样问题  ~ 而且你这个方法也不生效啊

<!–index.wxml–>

<!-- <dialog-area id=‘dialog’ /> -->

<view class=“weui-toptips weui-toptips_warn” wx:if="{{showTopTips}}">{{errorMsg}}</view>

<view class=“container”>

    <view class=“header”>

      <image mode=“widthFix” src="/images/index/index-bg.png" ></image>

    </view>

<view class=“header logo”>

      <image mode=“widthFix”  src="/images/index/index-logo.png" ></image>

    </view>

    <view class=“header title”>

      <image mode=“widthFix”  src="/images/index/index-title.png" ></image>

    </view>

<view class=“content”>

<view class=‘content-title’>

<view class=‘red-vertical’></view>

培训汇报

</view>

<form id=‘drafts’ bindsubmit=“draftsSubmit” class=‘content-box’>

<form id=‘report’ bindsubmit=“formSubmit” class=‘content-box’>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image  mode=“widthFix” src=’/images/input/map.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input value=’{{Geocoded}}’ name=‘Geocoded’  disabled=‘true’ bindtap=“bindGeocodedTap” type=“text” class=“weui-input-fire” placeholder=“请选择所在辖区” />

</view>

<block wx:if="{{showGps}}">

<view class=“item-input-ft”>

<view bindtap=‘gps’  hover-class=“navigator-hover” class=“gps-btn”>

<view  class=“gps-btn-icon”><image  mode=“widthFix” src=’/images/input/gps.png’></image></view>

<view  class=“gps-btn-word”>定位辖区</view>

</view>

</view>

</block>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/flag.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input name=‘address’ value=’{{address}}’  type=“text” class=“weui-input-fire” placeholder=“请输入详细地址” />

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/type.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<picker name=‘publicityType’ bindchange=“bindTypeChange”  value="{{publicityType}}" range="{{types}}" range-key=‘title’ >

<block wx:if="{{publicityType!=0}}">

<view  class="weui-input-fire ">{{types[publicityType].title}}</view>

</block>

<block wx:else>

<view  class=“weui-input-fire default”>{{types[publicityType].title}}</view>

</block>

</picker>

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/home.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input value=’{{organization}}’ name=‘organization’ type=“text” class=“weui-input-fire” placeholder=“请输入单位名称” />

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/number.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input value=’{{number}}’ name=‘number’ bindinput=“bindReplaceNumber” type=“number” class=“weui-input-fire” placeholder=“请输入培训人数” />

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/name.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input value=’{{contactName}}’ name=‘contactName’ type=“text” class=“weui-input-fire” placeholder=“请输入联系人姓名” />

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/phone.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<input value=’{{contactNumber}}’ name=‘contactNumber’ bindinput=“bindReplaceNumber” type=“number” class=“weui-input-fire” placeholder=“请输入联系人电话” />

</view>

</view>

</view>

<view class=‘item-input-box’>

<view class=‘item-input-icon’><image mode=“widthFix” src=’/images/input/remarks.png’></image></view>

<view class=‘item-input’>

<view class=“item-input-bd”>

<textarea value=’{{remarks}}’ name=‘remarks’ maxlength=“200” bindinput=“bindInputRemarks”   class=“weui-textarea” placeholder=“请输入备注信息”  />

<view class=“weui-textarea-counter”>{{remarksCount}}/200</view>

</view>

</view>

</view>

<view class=‘item-input-box’ style=‘border: none; padding-bottom:0;’>

<view class=‘item-input-icon’><image  mode=“widthFix” src=’/images/input/image.png’></image></view>

<view class=‘item-input’ >

<view class=“item-input-bd”>

<input disabled=‘true’ type=“number” class=“weui-input-fire” placeholder=“请上传照片” />

</view>

</view>

</view>

<view class=‘item-input-box’ >

<upload id=‘upload’ style=‘width:100%;’ />

</view>

<button class=‘report_button’  formType=“submit” >汇报</button>

</form>

<button class=‘drafts_button’  formType=“submit” ><image mode=“widthFix” src=’/images/input/drafts.png’></image></button>

</form>

</view>

<view class=‘footer’>

        <span>©</span>

    </view>

</view>

回到顶部