plantain-00 / schema-based-json-editor

A reactjs and vuejs component of schema based json editor.
MIT License
168 stars 38 forks source link

Firefox only permits integer number (not floating point) in number fields #32

Closed phispi closed 3 years ago

phispi commented 3 years ago

Sorry, it's me again: Nothing urgent but I discovered that Firefox does not like numbers (type number) that have a fractional part, e.g. 3.14159. The input field gets a red border. However, it seems that the input is still accepted so this is more an optical thing (that still might confuse users).

Steps to reproduce:

  1. Open your demo https://plantain-00.github.io/schema-based-json-editor/packages/vue/demo/ with Firefox
  2. Enter 123.5 in "a number example"

In Chrome everything works fine.

A possible fix seems to be to add a "step" attribute to the number input field. At least after doing so Firefox does add a red border anymore.

Thanks again for this wonderful component!

plantain-00 commented 3 years ago

v8.2.0 should fix this

phispi commented 3 years ago

Works, you are a genius, thank you! :-)