svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Transition leaves empty style element

Open Restorn opened this issue 3 years ago • 5 comments

Describe the bug

Introduced in #7114

The current version clears the stylesheet and removes reference to it but leaves the empty style element behind. Every transition creates a new style duplicate. Previous version kept stylesheet reference as a part of the document.

Reproduction

https://svelte.dev/repl/a6eddb766f9e474c92e5a23ba0bba362?version=3.46.2

Logs

No response

System Info

REPL

Severity

annoyance

Restorn avatar Jan 20 '22 01:01 Restorn

Note that this is a memory leak for all intents and purposes, so any long-running app that is heavy in transitions will pile up empty tags rather quickly.

Whoever is prioritizing issues in this project might want to consider bumping the priority up a notch :)

betamos avatar Feb 24 '22 06:02 betamos

My pull request got approval for running workflows, but many of them failed during the install-step because of a weird type error. I have no problem finding out what caused the type error, but i need help from a maintainer to run the workflows again.

It feels weird that this bug has been part of Svelte so long.

MathiasWP avatar Feb 26 '22 16:02 MathiasWP

Alot reports regard to this issue, i got too and must find way to workaround by use tailwindcss transition with external plugin.. Any update about this?

TrungRueta avatar May 02 '22 08:05 TrungRueta

Any update?

laztheripper avatar Jul 05 '22 10:07 laztheripper

I think this PR will fix the issue.

https://github.com/sveltejs/svelte/pull/7260

baseballyama avatar Jul 05 '22 10:07 baseballyama

Fixed in 3.50.0 - https://svelte.dev/repl/a6eddb766f9e474c92e5a23ba0bba362?version=3.50.0

Conduitry avatar Sep 02 '22 12:09 Conduitry