安卓textarea的父容器已隐藏此控件内容提示漂移到屏幕顶部bug
发布于 5 年前 作者 yanglong 13209 次浏览 来自 问答
    <view class="dialog-root" hidden="{{!currentItemId}}">
        <view class="dialog-layout" id="dialog-layout">
            <form bindsubmit="formSubmit" bindreset="formReset">
                <textarea name="input" class="dialog-input" id="commentinput" placeholder="请输入评论" style="height:auto"
                          value="{{input}}" placeholder-style="color:#EBEBEB;" />
                <view class="dialog-action">
                    <button class="dialog-cancnel" bindtap="onDialogCancelPress" formType="reset">取消</button>
                    <button class="dialog-confirm" bindtap="onDialogOkPress" formType="submit">确定</button>
                </view>
            </form>
        </view>
    </view>
 
.dialog-root {
  background: black;
  width: 100%;
  height: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
 
.dialog-root .dialog-layout {
  border-radius: 15rpx;
  width: 70%;
  height: 70vw;
  z-index: 999;
  background-color: white;
  color: black;
}
 
#dialog-layout {
  padding: 15rpx;
}

默认是隐藏的,

对吧,但是出现了啥情况呢, 请输入评论几个字在屏幕上边了没有被隐藏了, 当我把这个对话框弹出来后

就正常了,隐藏 后 请输入评论寄给字屏幕左边。

area

rea

3 回复

据说下本版本会修复哈哈

同样的问题,父容器的opacity属性对textarea组件中的内容不起效,他自己的opacity属性也不起效,内容文字和placeholder还是回显示出来。在线等官方修复

是会有这个bug,当前版本我们是先跳转到新的页面,看修复好了再做

回到顶部