-
Notifications
You must be signed in to change notification settings - Fork 840
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
[EuiFieldNumber] Safari marks as invalid floating point numbers when step is not provided #5327
Comments
Can you think of any cases where consumers who have relied on the expectancy that the default step is |
Using the palette configurator in Lens has high probability to show those invalid markers as the first 5 stops are autogenerated. Another possible common place is the new Lens reference line editor where the default value is autogenerated. |
Thanks @dej611 for these Lens-specific use cases. Is it not possibly to change the My question was mostly directed towards our engineers about other general use-cases of this component as it's used 180 times in Kibana alone. |
We can solve on our side, sure. |
Closing this as not planned - since it's been a while and most consumers are used to |
After the new invalid browser styling, and after having conferred with designers, we've decided to default |
I've noticed this issue while testing few components in Lens, which can be quite misleading for the user I think.
This is an example of a UI affected by this:
the first time I saw it I thought the values were invalid somehow, but after the investigation I found it was the Safari correct about the spec. 😓
While by default the fallback value for
step
is the integer value 1, hence any floating point should be invalid, most browser do not respect this and let the user input any value. Safari is the only browser which implements the invalid check by the spec on this side.(source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step )
Safari:
Chrome:
Using the
any
step value seems to align Safari with the rest of the browsers for the validation.I'd propose to add a
any
fallback for thestep
prop on theEuiFieldNumber
component to fix this behaviour.The text was updated successfully, but these errors were encountered: