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

[t-input] clearable + clear-trigger="focus"在点击清空按钮时,blur事件和clear事件发生顺序反转了 #3299

Open
PremierLao opened this issue Nov 21, 2024 · 4 comments
Labels
question This is a question, not a bug

Comments

@PremierLao
Copy link

PremierLao commented Nov 21, 2024

tdesign-miniprogram 版本

1.8.0

重现链接

No response

重现步骤


function onBlur(){
console.log('blur发生了')
}
function onClear(){
console.log('clear发生了')
}
输入框中输入字符,点击清空按钮,打印的是:blur发生了
此时再点击外部失焦,打印:clear发生了

期望结果

clear发生了

实际结果

blur发生了

基础库版本

No response

补充说明


function onBlur(){
console.log('blur发生了')
}
function onClear(){
console.log('clear发生了')
}
输入框中输入字符,点击清空按钮,打印的是:blur发生了
此时再点击外部失焦,打印:clear发生了

Copy link
Contributor

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

@anlyyao
Copy link
Collaborator

anlyyao commented Nov 27, 2024

@PremierLao 我这边在模拟器和真机上测试,两个事件都按预期触发了。 方便在提供一下录屏、真机型号吗?

@anlyyao anlyyao added the question This is a question, not a bug label Nov 27, 2024
@PremierLao
Copy link
Author

TDesign.mp4

@PremierLao
Copy link
Author

@PremierLao 我这边在模拟器和真机上测试,两个事件都按预期触发了。 方便在提供一下录屏、真机型号吗?

视频已上传

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question, not a bug
Projects
None yet
Development

No branches or pull requests

2 participants