Skip to content

Transition prevents {#if}{:else}{/if} from being exclusive #3410

@iffy

Description

@iffy

Describe the bug
A transition deep within some components makes both the true and false parts of an if/else render on the page.

To Reproduce

  1. Go to https://svelte.dev/repl/c902889c05814dd69198661ad49030e1?version=3.8.1
  2. Click the three things it tells you to click
  3. See that the blue and purple (if and else parts of the if/else in App.svelte) are both showing
    If you remove transition:slide from Scaffold.svelte the problem is no longer there.

Expected behavior
I expect either the true or the false sections of the if statement to show, not both at the same time.

Information about your Svelte project:

  • Your browser and the version: Firefox

  • Your operating system: macOS

  • Svelte version: I don't know? Whatever the REPL is running?

  • Whether your project uses Webpack or Rollup: Rollup

Severity
Mildly annoying. I'll remove the transition for now, but would love to be able to use transitions when I release the production app.

Additional context
I'm a newbie and very impressed with Svelte.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions