Skip to content

Binding to color input sets value of #000000 after mountΒ #15224

@cezaryszymanski

Description

@cezaryszymanski

Describe the bug

Hello

I found this bug when updating svelte from 5.2.7 to 5.19.8. When the value is binded to input with type color and the initial $state value is nullish then the value is changed to #000000 on mount. Before the update the value didn't change and stayed null

Reproduction

https://stackblitz.com/edit/vitejs-vite-c8kjjzku?file=src%2FApp.svelte

Logs

System Info

System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 19.40 GB / 31.04 GB
    Container: Yes
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
    pnpm: 10.2.0 - ~/.nvm/versions/node/v20.14.0/bin/pnpm
    bun: 1.1.3 - ~/.bun/bin/bun
  Browsers:
    Chrome: 133.0.6943.53
  npmPackages:
    svelte: ^5.19.8 => 5.19.8

Severity

blocking an upgrade

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