小程序 input 在有焦点时字体自动加粗
- 当前 Bug 的表现(可附上截图)
font-weight:500;letter-spacing:4rpx
获取焦点后字重和字距失效, 失去焦点后恢复正常
- 预期表现
正常情况下字重不会改变
- 复现路径
开发者工具显示正常
在iphone8 小米6等真机上复现
- 提供一个最简复现 Demo
<input class="editText {{phoneFocus?'borderRed':''}}"
placeholder-class="editText-placeholder" bindinput="phone" maxlength="11"
name='phone'
data-value='phone' bindblur='inputBlur'
bindfocus='inputFocus' type='number' placeholder='请输入手机号'/>
<input class="editText {{passwordFocus?'borderRed':''}}" placeholder-class="editText-placeholder"
bindinput='password' type='password' bindfocus='inputFocus'
bindblur='inputBlur' data-value='password'
placeholder='请输入登录密码'/>
input{height:108rpx;caret-color:#fc5a44;font-size:35rpx;font-weight:500;letter-spacing:4rpx;line-height:69rpx;}
.borderRed{border-bottom: 1px solid #fc5a44!important;}
.editText{color:rgba(36,39,46,1);border-bottom: 1px solid rgba(238,237,243,1);}
.editText-placeholder{color:rgba(200,201,204,1);}
2 回复