Subscribe on changes!

`input` hydration mismatch with SSR

avatar
Jan 9th 2024

Vue version

3.4.6

Link to minimal reproduction

https://stackblitz.com/edit/github-dbb6s1?file=app.vue

Steps to reproduce

Run npm run dev and check browser's console.

What is expected?

The input element should be rendered without hydration issues.

What is actually happening?

image

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  npmPackages:
    vue: ^3.4.6 => 3.4.6

Any additional comments?

This issue is related to the feature introduced on (#5953).

When binding the attribute readonly and setting it to false the mismatch warning is thrown. The issue is probably related to the fact that the key represents the attribute name which is readonly. However the key of the HTML element is readOnly.

https://github.com/vuejs/core/blob/a3725a729cc99dc0ebe7c50ca65f183b8ff30073/packages/runtime-core/src/hydration.ts#L761

avatar
Jan 10th 2024

nuxt-img has the same issue.