Skip to content

Svelte 5: Event handlers not triggering #10646

@itsezc

Description

@itsezc

Describe the bug

The event handlers for onclick, focus, onmouseover etc. do not trigger the callbacks

Reproduction

<button
  onmouseover={() => {
    console.log('Mouse over');
  }}
  focus={() => {
    console.log('Focused');
  }}
  onclick={() => {
    console.log('Clicked test');
  }}
>
  Test
</button>

Logs

No response

System Info

System:
    OS: macOS 14.3
    CPU: (12) arm64 Apple M2 Max
    Memory: 377.22 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.3.0 - ~/.nvm/versions/node/v20.3.0/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v20.3.0/bin/npm
    bun: 1.0.29 - ~/.bun/bin/bun
  Browsers:
    Chrome: 122.0.6261.69
    Safari: 17.3
    Safari Technology Preview: 17.4
  npmPackages:
    svelte: ^5.0.0-next.68 => 5.0.0-next.41


### Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterneeds a reproduction, or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions