diff --git a/web_app/src/components/ui/textarea.tsx b/web_app/src/components/ui/textarea.tsx index 80c2e38..b940703 100644 --- a/web_app/src/components/ui/textarea.tsx +++ b/web_app/src/components/ui/textarea.tsx @@ -1,12 +1,23 @@ import * as React from "react" import { cn } from "@/lib/utils" +import { useStore } from "@/lib/states" export interface TextareaProps extends React.TextareaHTMLAttributes {} const Textarea = React.forwardRef( ({ className, ...props }, ref) => { + const updateAppState = useStore((state) => state.updateAppState) + + const handleOnFocus = () => { + updateAppState({ disableShortCuts: true }) + } + + const handleOnBlur = () => { + updateAppState({ disableShortCuts: false }) + } + return (