From 9331c9b9c08ca1b37dd6331b2f95ecaa47a39709 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jul 2023 22:54:50 -0300 Subject: [PATCH] Fix copy paste on text area --- src/frontend/src/components/textAreaComponent/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index 2a7abe859..8083b4eb7 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -5,6 +5,7 @@ import { TextAreaComponentType } from "../../types/components"; import { TypeModal } from "../../utils"; import { ExternalLink } from "lucide-react"; +import { TabsContext } from "../../contexts/tabsContext"; export default function TextAreaComponent({ value, @@ -14,6 +15,7 @@ export default function TextAreaComponent({ }: TextAreaComponentType) { const [myValue, setMyValue] = useState(value); const { openPopUp, closePopUp } = useContext(PopUpContext); + const { setDisableCopyPaste } = useContext(TabsContext); useEffect(() => { if (disabled) { @@ -31,6 +33,12 @@ export default function TextAreaComponent({
{ + setDisableCopyPaste(true); + }} + onBlur={() => { + setDisableCopyPaste(false); + }} className={ editNode ? " input-edit-node "