diff --git a/app/components/InputVector.tsx b/app/components/InputVector.tsx index 0a10274524..3c4d3c5a17 100644 --- a/app/components/InputVector.tsx +++ b/app/components/InputVector.tsx @@ -1,5 +1,6 @@ import { useRef } from "react"; import { twMerge } from "tailwind-merge"; +import { ignoreDelete } from "~/pages/PageEnigma/store"; interface InputVectorProps { x: number; @@ -41,6 +42,8 @@ export const InputVector = ({ x, y, z, onChange }: InputVectorProps) => { onChange={handleOnChange} ref={xRef} value={x} + onFocus={() => (ignoreDelete.value = true)} + onBlur={() => (ignoreDelete.value = false)} /> { onChange={handleOnChange} ref={yRef} value={y} + onFocus={() => (ignoreDelete.value = true)} + onBlur={() => (ignoreDelete.value = false)} /> { onChange={handleOnChange} ref={zRef} value={z} + onFocus={() => (ignoreDelete.value = true)} + onBlur={() => (ignoreDelete.value = false)} /> diff --git a/app/components/Textarea.tsx b/app/components/Textarea.tsx index 278b54a7cb..cc35c75ac2 100644 --- a/app/components/Textarea.tsx +++ b/app/components/Textarea.tsx @@ -2,6 +2,7 @@ import { TextareaHTMLAttributes } from "react"; import { twMerge } from "tailwind-merge"; import { Label } from "./Typography"; import { kebabCase } from "~/utilities"; +import { ignoreDelete } from "~/pages/PageEnigma/store"; type ResizeType = | "none" @@ -24,14 +25,10 @@ export const Textarea = ({ }) => { return (
- {label && - - } - + {label && } +