Calcite-components: Bug: calcite-input type=number - can enter weird numbers

Created on 21 Apr 2021  路  4Comments  路  Source: Esri/calcite-components

Summary

  • calciteInputInput returns 000000, should probably not display this
    image

  • calciteInputInput returns valid numbers 1 and 5, but it should not allow a display like this
    image

  • calciteInputInput returns 03
    Start with a value of 0. Then type in a 3 after the 0. The input box correctly updates to just 3.
    image

Actual Behavior

Expected Behavior

Reproduction Steps

1.

Relevant Info

1 - assigned bug

All 4 comments

@AdelheidF @jcfranco Should we diverge from how the native <input type="number"> element works by truncating 00000 to just 0? In a native number input, it allows multiple zeros, both in the display and the stored value at form submission time:

image
image

I don't see where these zeros would ever be useful for an input field of type number.

Tested with the latest next.226 (from 11 days ago!)

I can no longer enter 1.... or 1,,,,, so that part is good.
Waiting on a newer next release to test 0000.

Tested now with next.227 and 0000 is good too.

Was this page helpful?
0 / 5 - 0 ratings