primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.58k stars 4.61k forks source link

Component: InputNumber - Control update on blur even when value has not been changed #12832

Open MarcinBorowski95 opened 1 year ago

MarcinBorowski95 commented 1 year ago

Describe the bug

When using the InputNumber component it updates the control value and state on blur even when no change has been made to the value

Environment

All environments from dev to prod

Reproducer

No response

Angular version

15.2.4

PrimeNG version

15.2.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.12.1

Browser(s)

Chrome, Egde

Steps to reproduce the behavior

  1. Create a control with updateOn strategy set to 'blur'
  2. Use InputNumber component to show the control
  3. Focus on the input
  4. Focus out off the input
  5. Control value is updated to the same one
  6. Control is set to being dirty even when no change has been made to the value

Expected behavior

On blur when no change is made to the input value the control should not be updated. Control should not be dirty.

volvachev commented 1 year ago

I think it's a duplicate 12673