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:
committed by
GitHub
parent
20cde0ef70
commit
5c95fa65dd
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user