Skip to content

Svelte 5.1.5: bind:this breaks with #snippet #14068

@Razunter

Description

@Razunter

Describe the bug

bind:this={variable} breaks when element contains #snippet inside. The bug was introduced in v5.1.5.

<form bind:this={thisBug}>
{#snippet Bug()}
{/snippet}
</form>

Reproduction

https://stackblitz.com/edit/vitejs-vite-ot6c27?file=src%2FApp.svelte

Logs

No response

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
    Memory: 10.53 GB / 15.55 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 23.0.0 - ~/.volta/tools/image/node/23.0.0/bin/node
    npm: 10.9.0 - ~/.volta/tools/image/node/23.0.0/bin/npm
    pnpm: 9.12.2 - ~/.volta/bin/pnpm
    bun: 1.1.33 - ~/.bun/bin/bun
  npmPackages:
    rollup: ^4.24.3 => 4.24.3
    svelte: ^5.1.6 => 5.1.6

Severity

blocking an upgrade

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions