Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Popup] 弹出层中加入input输入框,输入框的placeholder内容会向下跳动一次 #2300

Open
Ronass opened this issue Aug 18, 2023 · 7 comments
Labels
wontfix This will not be worked on

Comments

@Ronass
Copy link

Ronass commented Aug 18, 2023

tdesign-miniprogram 版本

1.2.0

重现链接

No response

重现步骤

以下为测试代码内容,可直接复制

index.js

Page({
    data: {
        visible: false
    },
    open() {
        this.setData({
            visible: true
        })
    },
    onVisibleChange(e){
        this.setData({
            visible: e.detail.visible,
        });
    }

})

index.json

{
  "usingComponents": {
    "t-popup": "tdesign-miniprogram/popup/popup"
  }
}

index.wxml
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="center"> <view class="block"> <input type="text" placeholder="请输入内容"/> </view> </t-popup> <button catch:tap="open">打开</button>

index.wxss

.block{
    width: 650rpx;
    height: 400rpx;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block input{
    border: 1px solid red;
}
Video_20230818115531.mp4

期望结果

input placeholder 不抖动

实际结果

No response

基础库版本

2.33.0

补充说明

No response

@github-actions
Copy link
Contributor

👋 @Ronass,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@LeeJim
Copy link
Collaborator

LeeJim commented Aug 22, 2023

这个是微信底层的问题,似乎没有办法处理,你直接使用原生input估计也是一样的问题

@LeeJim LeeJim added the wontfix This will not be worked on label Aug 22, 2023
@Ronass
Copy link
Author

Ronass commented Aug 28, 2023

这个是微信底层的问题,似乎没有办法处理,你直接使用原生input估计也是一样的问题

我放弃了使用td,改用了vant,这个没有出现这个问题,但我还是希望官方修复一下,我比较喜欢td

@dengxiwang
Copy link

确实是有问题

@dengxiwang
Copy link

这个是微信底层的问题,似乎没有办法处理,你直接使用原生input估计也是一样的问题

这个是popup弹出层的动画导致的,我测试的仅在popup的placement为center时出现

@dengxiwang
Copy link

建议当前可以使用延迟加载的方法解决这个bug,初识时placeholder的值为‘’,等300ms动画结束后设置placeholder的值为你想要的,可以解决这个问题,settimeout的值建议设置为350,300也会有问题,等弹窗关闭时候,placeholder的值恢复默认值‘’

@yumaopiaoa
Copy link

而且打开弹层的时候输入框会自动聚焦调起键盘,这能取消的吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants