Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
fix bug with focusing textarea
Abi Raja5f3868f3c9d8
diff --git a/frontend/src/components/select-and-edit/EditPopup.tsx b/frontend/src/components/select-and-edit/EditPopup.tsxindex ca32e650..5b708131 100644--- a/frontend/src/components/select-and-edit/EditPopup.tsx+++ b/frontend/src/components/select-and-edit/EditPopup.tsx@@ -98,10 +98,14 @@ const EditPopup: React.FC<EditPopupProps> = ({// Reset the update textsetUpdateText("");++ // Focus the textarea+ textareaRef.current?.focus();}, [event, iframeRef]);- // Focus the textarea when the popup is visible (we can't do this when handling the click event+ // Focus the textarea when the popup is visible (we can't do this only when handling the click event// because the textarea is not rendered yet)+ // We need to also do it in the click event because popupVisible doesn't change values in that eventuseEffect(() => {if (popupVisible) {textareaRef.current?.focus();