-
Notifications
You must be signed in to change notification settings - Fork 576
fix(tooltip): tooltip 源码,始终显示 popup #6040
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
base: develop
Are you sure you want to change the base?
Conversation
TDesign Component Site Preview Open
|
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the tooltip component where popup positioning fails when content changes during textarea height calculations. The fix ensures tooltips remain visible consistently and prevents errors when the textarea element is destroyed during content updates.
- Always display tooltip popup to prevent element destruction issues
- Remove textarea height calculation on blur events to avoid timing conflicts
- Enhanced empty content detection for better popup visibility control
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/components/tooltip/tooltip.tsx | Removes early return for empty content to always render popup |
| packages/components/textarea/textarea.tsx | Removes height calculation on blur and consolidates value watchers |
| packages/components/popup/popup.tsx | Adds improved empty content detection function |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }>; | ||
|
|
||
| /** 判断是否为空字符串,或是空插槽 */ | ||
| function isEmptyContent(node: any) { |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter type 'any' is too broad and reduces type safety. Consider using a more specific type like 'VNode | string | null | undefined' or creating a union type for the expected node types.

closed #6028
🤔 这个 PR 的性质是?
🔗 相关 Issue
#6028
💡 需求背景和解决方案
改动说明:
tooltip 中的 popup,始终显示;
取消 textarea onBlur 的计算高度
popup 新增 isEmptyContent
去掉了一个 inner 的重复监听
📝 更新日志
tdesign-vue-next
@tdesign-vue-next/chat
@tdesign-vue-next/auto-import-resolver
☑️ 请求合并前的自查清单