Skip to content

input hydration mismatch with SSR #10057

Closed
@becem-gharbi

Description

@becem-gharbi

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.

? el[key as keyof typeof el]

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

      X