Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input with type="number" does not update value after removing leading zeros from v-model binding #10615

Closed
Dzelix opened this issue Mar 29, 2024 · 1 comment

Comments

@Dzelix
Copy link

Dzelix commented Mar 29, 2024

Vue version

3.2.37

Link to minimal reproduction

https://play.vuejs.org/#eNqNU8tyEzEQ/JUpXbxOGa8pOBk7xcuHcAAq5IY4bLwTR2H1QBotNq79d0ZaP4JDUtnTqqfV06OWtuKdc+M2opiKWVh65QgCUnTn0ijtrCfYgsdqSapF6ODGWw0D5g+kkWZpTSC4tvXmEn/B/EAsttIA62i1WDvlsf6ITbWZwmSUcHyAdcOj2vIWlz9Zq2iHMD+HrNRXTNSMu8oHvDBU7Np+b3+M4OVk+CYRyxLoVgXeUCPUFgMYS0BeaWiwqpVZwR/0Cc+DKOMiQVs1EdPuoyL3mWTBfyA2wOCDPkk+PEe/PHukSzorulIabaSiOM6dvlMHCe9GsBv4rEyGOmlmZZ8e58YLQu2aipBXALPeRi9IG4dzKVjoGr0UO7R9oXmShgu7duPT8KTomW+zGBNzTsXglDcY7plaGaZNpCjZxay8Z0mMBAXO9EatxnfBGr57eVwWtdqpBv0XR4ozl2K6Pwgpqqaxvz9ljHzEfJXynmTkP/hdWCdMiq8eA/oWpTjUqPIrpL68+PYZ1/x/KPJRxIbZTxQvMdgmJo897X00Ndu+x8tuL/IL4ltxFRZrQhP2QyWjfZD93PygPjwx+tHuq/HrvI8zF91fADo9Yg==

Steps to reproduce

  1. Write from keyboard one ore more leading zeroes into input like 000123.

What is expected?

Value inside the input should be shown without leading zeroes.

What is actually happening?

Value in reactive bodyReq is without leading zeroes, however inside input it is shown with leading zeroes.

System Info

System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M1
    Memory: 53.63 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    npm: 10.1.0 - /usr/local/bin/npm
    bun: 0.5.8 - /usr/local/bin/bun
  Browsers:
    Chrome: 123.0.6312.86
    Safari: 17.3.1

Any additional comments?

If we put bodyReq[v] = num inside settimeout function it works.

@wangyewei
Copy link
Contributor

looks like same as #10503

@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants