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

fix(icon): click icon (svg) to change source position of tooltip, but tooltip is not closed when tooltip is bound to the component or native tag containing thy-icon INFR-8660 #2754

Merged
merged 6 commits into from
Jul 24, 2023

Conversation

minlovehua
Copy link
Contributor

@minlovehua minlovehua commented Jul 9, 2023

tooltip 绑定在子元素含有 svg 的组件或原生标签,hover 出来 tooltip 后,点击 svg 元素,编程(比如对列表排序)使得 tooltip 源位置发生变化,tooltip 没有关闭【点击 svg,当其绑定 tooltip 的父元素位置发生变化后,无法触发父元素的 mouseleave 事件】

可复现场景:

  1. thy-icon 组件,纯 svg ,点击可复现问题;
  2. 带文本的 thy-text 组件,点击 svg 元素可复现问题,点击文本没问题;
  3. 带 thyIcon 值的 thyAction 按钮,点击 svg 元素可复现问题,点击 thyAction 上 svg 以外的地方,没问题。
  4. tooltip 指令绑定在不含有 thy-icon 的组件或原生标签,没问题。

…, but the tooltip is not closed when tooltip is bound to the component or native tag containing thy-icon. INFR-8660
@vercel
Copy link

vercel bot commented Jul 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tethys ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 10:18am

@minlovehua minlovehua changed the title fix(icon): click the icon (svg) to change the position of the tooltip, but the tooltip is not closed when tooltip is bound to the component or native tag containing thy-icon INFR-8660 fix(icon): click icon (svg) to change source position of tooltip, but tooltip is not closed when tooltip is bound to the component or native tag containing thy-icon INFR-8660 Jul 9, 2023
@@ -133,6 +133,13 @@ export class ThyIconComponent implements OnInit, OnChanges {
}
}

private setSvgPointerEvents() {
Copy link
Contributor

Choose a reason for hiding this comment

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

我理解这个逻辑完全可以用 css 实现吧,是不是没必要通过 js 实现

… tooltip is not closed when tooltip is bound to the component or native tag containing thy-icon INFR-8660
@minlovehua minlovehua merged commit 0d3563d into master Jul 24, 2023
4 checks passed
@minlovehua minlovehua deleted the minlovehua/icon-tooltip-8660 branch July 24, 2023 10:22
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.

None yet

2 participants