Skip to content

Svelte does not recognize popover types/properties inside template  #10036

Closed
@minht11

Description

@minht11

Describe the bug

Try to use popover and observe that no types are incorrect even though typescript lib.dom.d.ts has definitions for it.

<div popover />
image

Try to add popover property and observe that its value is set as attribute instead of property.

<button popoverTargetElement={popoverElement} />

Reproduction

Reproduction

<script>
	let target = $state();
	let popover = $state()

	const workaround = (node) => {
		node.popoverTargetElement = popover
	}
</script>

<button
	bind:this={target}
	popoverTargetElement={target}
>
	Open
</button>

<button
	bind:this={target}
	use:workaround
>
	Open workaround
</button>

<div bind:this={popover} popover>
	Popup
</div>

Logs

No response

System Info

"svelte": "5.0.0-next.26"

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