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

video element created twice in slot with bind:this #7598

Closed
jer-0 opened this issue Jun 9, 2022 · 2 comments
Closed

video element created twice in slot with bind:this #7598

jer-0 opened this issue Jun 9, 2022 · 2 comments

Comments

@jer-0
Copy link

jer-0 commented Jun 9, 2022

Describe the bug

Video inside a slot with bind:this causes the video element to be rendered twice.
This can lead to many unexpected errors, like playing blocked because of new load request.

Reproduction

repl (open browser dev tools too): toggle the button and look at dev tools
https://svelte.dev/repl/aea5b0a97f3f42c2b61df53d24329e59?version=3.48.0

With slot:
Screenshot (37)

Without slot:
Screenshot (38)

Logs

No response

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 7.92 GB / 15.92 GB
  Binaries:
    Node: 18.3.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 102.0.5005.63
    Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.62)
    Internet Explorer: 11.0.22000.120


### Severity

annoyance
@jer-0
Copy link
Author

jer-0 commented Jun 10, 2022

this issue started on 3.14.0 update.
working fine as of 3.13.0: https://svelte.dev/repl/aea5b0a97f3f42c2b61df53d24329e59?version=3.13.0

@baseballyama
Copy link
Member

The runtime eagerly calls reactive statements.
This is the same issue as #5689

causes the video element to be rendered twice.

Please check the below screenshots.
both console logs specify same element.
It means the element is rendered only once.

image

image

When I click "remove slot" button, the existing console log doesn't specify the video element.
It means the original video element is gone.

image

Now I close this issue as duplicated of #5689 .
If you have more issue, we can reopen it or you can create new issue.
Thank you!

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