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

组件预览使用cloneNode引发的问题 #630

Open
wj619204325 opened this issue Aug 22, 2024 · 0 comments
Open

组件预览使用cloneNode引发的问题 #630

wj619204325 opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wj619204325
Copy link

Describe the bug
如果组件是一个video组件
<video src="xxxx"></video>,在编辑器双击组件,到组件预览,会发现video有两个音源在播放。
To Reproduce
举个例子 可以随便找一个有video的页面,选中video标签,然后在控制台执行$0.cloneNode(true),浏览器就会在后台再一次加载这个video,此时就会有两个视频在播放,一个是文档内的,另外一个不在文档内,但是仍然在播放。

因为组件预览是直接使用cloneNode实现的,这里我觉得可以考虑一下,从数据层面入手,通过数据的改变来驱动dom。

@jia000 jia000 self-assigned this Aug 22, 2024
@jia000 jia000 added the bug Something isn't working label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants