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(runtime-web): disable-scroll 切换为 false 时容器仍然不可滚动 #99

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

hwaphon
Copy link
Collaborator

@hwaphon hwaphon commented Aug 18, 2023

问题:disable-scroll 切换为 false 时容器仍然不可滚动。

原因:view 继承自 baseElement,baseElement 中提供了 addEventListener 方法,所以 view 中调用 addEventListener 注册的事件,无法通过 removeEventListener 取消。

解决:为了避免调用到父级自定义逻辑的 addEventListener,将事件的注册和解绑操作放到 shadowRoot 上去。

@lyfeyaj lyfeyaj changed the title fix: disable-scroll 切换为 false 时容器仍然不可滚动 fix(runtime-web): disable-scroll 切换为 false 时容器仍然不可滚动 Aug 18, 2023
@lyfeyaj lyfeyaj merged commit a2dcf89 into eleme:main Aug 18, 2023
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