1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-17 07:34:21 +01:00

Allow to start typing -0 in float field (#29665)

Prevent replacing "-0" with "0" while typing
This commit is contained in:
Florian Schweikert
2026-02-16 13:45:16 +01:00
committed by GitHub
parent 20cde0ef70
commit 5c95fa65dd

View File

@@ -76,6 +76,11 @@ export class HaFormFloat extends LitElement implements HaFormElement {
return;
}
// Allow user to start typing a negative zero
if (rawValue === "-0") {
return;
}
if (rawValue !== "") {
value = parseFloat(rawValue);
if (isNaN(value)) {