Closed andreasmwenzel closed 1 month ago
I wasn't able to reproduce the issue locally or in stackblitz https://stackblitz.com/~/github.com/andreasmwenzel/bind-color5 Can you confirm if this issue still occurs?
Interesting, I see the exact same issue using the stackblitz link
For curiosity's sake, I opened up firefox (130.0.1 (64-bit)) and am not seeing the issue there. Edge is also fine: 129.0.2792.52 (Official build) (64-bit). The initial issue appeared when using chrome: 129.0.6668.59 (Official Build) (64-bit) (cohort: Stable)
If other people cannot reproduce the issue, I'm willing to believe that somehow my chrome browser is the culprit.
I've tested it on Chrome Version 129.0.6668.101 (Official Build) (64-bit) on Windows. Could you specify your operating system too?
I figured out that the issue was with one of my chrome extensions. Specifically: https://chromewebstore.google.com/detail/colorpick-eyedropper/ohcpnigalekghcmgcdcenkpelffpdolg
Removing the extension from chrome resolved the issue. A coworker installed the extension and saw the same error. I'll be looking for a new eye-dropper extension.
I'm happy to consider this issue resolved, but will let you decide whether to close it or if you want to chase it down.
Thanks!
Thanks @andreasmwenzel if you'd like you can re-open the issue in the Svelte repository https://github.com/sveltejs/svelte regarding the extension and the hydration issue
Describe the bug
Trying to bind:value of a color input in svelte 5 creates a hydration mismatch.
In svelte 4, we can have a simple component that binds the value and uses it in the style attribute of an div:
Using this exact code in a fresh svelte5 project crashes the app with the error:
TypeError: element2.getAttribute is not a function
Removing the div brings the color picker back with a warning of a Hydration Missmatch
Reproduction
Working Svelte 4 minimal repo: https://github.com/andreasmwenzel/bind-color Broken Svelte 5 minimal repo: https://github.com/andreasmwenzel/bind-color5
Logs
System Info
Severity
serious, but I can work around it
Additional Information
No response