Skip to content

Svelte 5: When using svelte:element with this="input" or this="textarea", bind:this does not work. #10993

Closed
@HighFunctioningSociopathSH

Description

Describe the bug

svelte:element with its this set to "input" or "textarea" doesn't update its bind:this anymore.

Reproduction

+page.svelte

<svelte:options runes />

<script lang="ts">
  let thisRef = $state<HTMLInputElement>();
  $inspect(thisRef); // thisRef remains undefined
</script>

<svelte:element this="input" bind:this={thisRef} />
<!-- <svelte:element this="textarea" bind:this={thisRef} /> -->
<!-- textarea doesn't work either -->

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
    Memory: 4.71 GB / 15.63 GB
  Binaries:
    Node: 18.14.2 - C:\Program Files\nodejs\node.EXE
    npm: 9.7.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (122.0.2365.80)
    Internet Explorer: 11.0.22621.1
  
  For some reason, the npx command no longer shows my svelte information so my current svelte version is `^5.0.0-next.89`

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    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