calcite-design-system icon indicating copy to clipboard operation
calcite-design-system copied to clipboard

No `change` event if input cleared after setting value programmatically with focus

Open nwhittaker opened this issue 2 years ago • 0 comments

Actual Behavior

If an empty calcite-input element has focus and its value is set programmatically, it will not dispatch a calciteInputChange event if it's manually cleared and blurred.

Expected Behavior

A calciteInputChange event is dispatched because the value was changed due to a user interaction.

Reproduction Sample

https://ember-twiddle.com/84ec2591fdac5ae61ae10e6dc804d632/3e2cba5bcd55a0fb71c82258be68d252a4fea18e

Reproduction Steps

  1. Visit the sample and open the browser's dev tools console
  2. Click the "Seed value with focus shift" button
  3. After focus shifts to the input, clear the contents of the input, and then blur the input in some way
  4. Observe that "didChangeSeededInput" does not appear in the console indicating that the input's calciteInputChange handler was not run

Reproduction Version

1.0.0-next.415

Relevant Info

A follow-on to https://github.com/Esri/calcite-components/issues/4229.

Regression?

No response

nwhittaker avatar Mar 14 '22 19:03 nwhittaker