Skip to content

Svelte 5 compatibility #144

@techniq

Description

@techniq

Issue to track any Svelte 5 compatibility issues. Hoping close to 0 changes are required in Svelte UX to support 5.


⚠️ PENDING: sveld (API docs) not compatible

issue: #435


✅ FIXED: MultiSelect hangs browser (MultiSelectField / MultiSelectMenu appear to work fine)

example: https://svelte5-docs.svelte-ux.pages.dev/docs/components/MultiSelect (see screenshot)
fix: #507


✅ FIXED: SelectField raises node_invalid_placement_ssr

Server-side

node_invalid_placement_ssr: <button> (src/lib/components/SelectField.svelte:415:0) cannot contain <button> (src/lib/components/Button.svelte:446:0)

This can cause content to shift around as the browser repairs the HTML, and will likely result in a hydration_mismatch warning.

Client-side

Uncaught (in promise) HierarchyRequestError: Failed to execute 'appendChild' on 'Node': This node type does not support this method.

fix: 4e17218


✅ FIXED: Form $: dispatch('change', ...) called immediately (not after change)

examples: svelte 4, svelte 5
fix: f419435


✅ FIXED: SelectField selection not working (bind:value issue?)

example: https://svelte5-docs.svelte-ux.pages.dev/docs/components/SelectField
fix: #448


✅ FIXED: Duration Cannot access 'timer' before initialization

example: https://svelte5-docs.svelte-ux.pages.dev/docs/components/Duration
fix: #447


✅ WORKAROUND: Dialog/Drawer can only be opened once (likely portal related). Removes subsequent elements. Issue with portal'd content and multiple elements in same

issue: sveltejs/svelte#12440, see also: sveltejs/svelte#12427 (comment)
example: https://svelte5-docs.svelte-ux.pages.dev/docs/components/Dialog
workaround: Place each portal'd content into separate {#if} block (commit)


✅ WORKAROUND: Portal actions timing is different with available DOM

issue: #437
fix: add explicit document.body for example, likely only affects docs (presence of .PortalTarget element)

✅ WONTFIX: <tr> is invalid inside <table>

issue: sveltejs/svelte#12090
fix: add explilcit <tbody>


✅ FIXED: can only receive attributes, not directives

issue: sveltejs/svelte#10382
fix: sveltejs/svelte#10391


✅ FIXED: type attribute must be a static text value if input uses two-way binding

Fixed via: sveltejs/svelte#9713
Reported in discord. If ran within the Svelte 5 beta (ex. 5.0.0-next.15), currently Input throws a 'type' attribute must be a static text value if input uses two-way binding error

image


✅ FIXED: let directive on <svelte:self>

issue: sveltejs/svelte#9710
fix: sveltejs/svelte#9727

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions