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

当目标元素触发了外层的scroll时显示错误 #20

Open
luluxiaocc opened this issue Nov 1, 2021 · 1 comment
Open

当目标元素触发了外层的scroll时显示错误 #20

luluxiaocc opened this issue Nov 1, 2021 · 1 comment

Comments

@luluxiaocc
Copy link

  1. 比如a是父级, 目标元素是b (selector), 当a触发 overflow: auto; 内部滚动的时候则显示的不对
  2. 还要考虑多层滚动的情况, 比如 目标元素是b (selector), b 的父级是 a, a的父级是a1, a1的父级是a1, 并且a&a1&a1 都有滚动的情况需要循环判断。
@NicolaCage
Copy link
Contributor

NicolaCage commented Feb 7, 2022

这个我也出现了, 多层父元素存在滚动蒙层错误,这个感觉不太好修复。
我是在useEffect监听realWindow的滚动事件同时又增加当前滚动父元素的监听事件,能满足我的业务场景,仅供参考哈
image

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

No branches or pull requests

2 participants