mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 23:03:06 +00:00
Fix bug where user can type character into object panel (#525)
Co-authored-by: Christopher Oliphant <christopheroliphant@christophersmbp.home>
This commit is contained in:
1 parent
e8058bb7ac
commit
6e89d24b21
1 file changed
+1
-1
@@ -51,7 +51,7 @@ export const InputVector = ({
|
||||
if (newValue === "" || newValue === "-" || newValue === ".") {
|
||||
return newValue;
|
||||
}
|
||||
return /^-?[0-9]*(.[0-9]*)?$/.test(newValue) ? newValue : oldValue;
|
||||
return /^-?\d*(\.\d{0,2})?$/.test(newValue) ? newValue : oldValue;
|
||||
}
|
||||
|
||||
function handleOnChange(event: ChangeEvent<HTMLInputElement>) {
|
||||
|
||||
Reference in new issue
Block a user