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

[popover与tooltips] 当触发他的元素不再可视区域内,自动隐藏。 #2781

Closed
zhoulujun opened this issue Sep 6, 2023 · 2 comments
Labels
usage the issue is about usage

Comments

@zhoulujun
Copy link
Contributor

zhoulujun commented Sep 6, 2023

这个功能解决了什么问题

比如button 添加了tootips ,当button滚动到不可见区域,或者上面被东西覆盖了。自动隐藏。

image

你建议的方案是什么

用 IntersectionObserver 监听他的触发容器,当元素不可见,自动隐藏触发内容。

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

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

@uyarn uyarn added the usage the issue is about usage label Sep 19, 2023
@uyarn
Copy link
Collaborator

uyarn commented Sep 19, 2023

popup底层的位置是依赖popperjs来控制的;
https://popper.js.org/docs/v2/modifiers/hide/ 如果不需要它自动做modifier的位置变化,可以通过这个样式设置来满足需求

@uyarn uyarn closed this as completed Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage the issue is about usage
Projects
None yet
Development

No branches or pull requests

2 participants