Skip to content

Number -0 cannot be correctly rendered in input :value #11909

@yuwu9145

Description

@yuwu9145

Version

2.6.11

Reproduction link

https://codepen.io/yuchaosydney/pen/xxRgEPP

Steps to reproduce

  1. Open reproduction link
  2. Compare display value from input tag rendered by Vue and plain input html tag

What is expected?

Input dom should correctly render value -0

What is actually happening?

It renders as 0


In javascript, Number -0 is legitimate value, this can be verified by checking Number(-0) === -0. Therefore, when input :value is number -0, input tag should correctly display it, just as a plain input html tag does.

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