Skip to content

fix(Popup): close previous popup when moving to another nested component#4095

Closed
RylanBot wants to merge 5 commits intodevelopfrom
rylan/fix/popup/hover
Closed

fix(Popup): close previous popup when moving to another nested component#4095
RylanBot wants to merge 5 commits intodevelopfrom
rylan/fix/popup/hover

Conversation

@RylanBot
Copy link
Collaborator

@RylanBot RylanBot commented Jan 19, 2026

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

tdesign-react

  • fix(Popup): 修复 trigger="hover" 且为嵌套使用的场景下,鼠标移走时弹层未关闭的问题
  • fix(Popup): 修复 trigger="hover" 且弹层与触发元素间距过大时,鼠标还未移入弹层就关闭的问题

@tdesign-react/chat

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@tdesign-bot
Copy link
Collaborator

tdesign-bot commented Jan 19, 2026

TDesign Component Site Preview Open

Component Preview
tdesign-react 完成
@tdesign-react/chat 完成

@RylanBot RylanBot force-pushed the rylan/fix/popup/hover branch from e7e902a to aafb673 Compare January 19, 2026 22:12
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

  • tdesign-react-demo

    npm i https://pkg.pr.new/Tencent/tdesign-react@4095
    
    npm i https://pkg.pr.new/Tencent/tdesign-react/@tdesign-react/chat@4095
    

commit: b9cb146

return element instanceof Element ? element : null;
}, [triggerElementIsString, triggerElement]);

const handleMouseEnter = (e: MouseEvent) => {
Copy link
Collaborator Author

@RylanBot RylanBot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果有 offset / margin 太远的时候...鼠标还没来得及移入弹层就会消失
复现:https://tdesign.tencent.com/react/components/popup#popperoptions-%E4%BD%BF%E7%94%A8

@RylanBot RylanBot closed this Jan 22, 2026
@RylanBot RylanBot reopened this Jan 22, 2026
@RylanBot RylanBot closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants