sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
78.53k stars 4.12k forks source link

bug(repl): broken onclick `e.preventDefault()` in svelte 5 REPL #12127

Closed Theo-Steiner closed 2 months ago

Theo-Steiner commented 3 months ago

Describe the bug

Description

Calling e.preventDefault on an event handler attached with onclick in the svelte 5 REPL does not seem to do anything. Using a different way to attach the event handler, e.g. on:click restores the intended behavior.

Suspected Cause

@Rich-Harris mentioned on discord that this issue perhaps being related to this piece of code

Reproduction

Broken REPL

Logs

No response

System Info

REPL (chrome)

Severity

annoyance

Neptunium1129 commented 3 months ago

i thought Severity level critical.. ^^;

trueadm commented 2 months ago

Closed due to https://github.com/sveltejs/svelte/pull/12135