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

动画结束事件未正确触发,导致父元素样式未清除,以及对渲染至有滚动条的DOM中时的处理建议 #141

Open
sorry77 opened this issue Jun 18, 2020 · 0 comments

Comments

@sorry77
Copy link

sorry77 commented Jun 18, 2020

官方Demo即可稳定复现,打开渲染至当前DOM的抽屉,再打开基础抽屉,然后关闭基础抽屉就会发现body的滚动条没了,body上的样式没有被清除。
在二次封装时发现是动画结束事件未触发,封装添加的样式就也没能被清除。

另外现在渲染至有滚动条的DOM中时,是将其scrollTop设置为0来保证能看到抽屉的,并且不会还原,只有在渲染至body时特殊处理了不影响滚动条,是否可以考虑使用getBoundingClientRect配合translateY来保证抽屉出现在可视区内呢?

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

1 participant