Skip to content

Svelte bind:this does not give proper working inside onMount body #6919

Closed
@Ultarius

Description

@Ultarius

Describe the bug

After importing Svelte component manually, there are issues retrieving the HTML element with the 'bind:this' binding. After using it inside the onMount function body, the page should be fully loaded and the value 'should' be available. After using a setTimeout block, the issue seems to be resolved.

Issue found after using svelte extension; https://github.com/ANovokmet/svelte-gantt

Seems broken from version=3.18.2

Reproduction

https://svelte.dev/repl/43c5c3945d354cfc8fffeb80f4099255?version=3.44.1

image

Logs

No response

System Info

https://svelte.dev/repl 

version=3.44.1

'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36'

Severity

annoyance

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