diff --git a/frontend/src/components/Task/TaskFormModal.jsx b/frontend/src/components/Task/TaskFormModal.jsx index e5364ac6..70837b3c 100644 --- a/frontend/src/components/Task/TaskFormModal.jsx +++ b/frontend/src/components/Task/TaskFormModal.jsx @@ -201,7 +201,13 @@ import FormError from "../common/FormError"; const toggleTag = (tagName) => { if (tagName === "Other") { - // toggle showing the custom input + // If "Other" is already in the tags array (added as a custom tag), remove it + if (tags.includes("Other")) { + setTags((prev) => prev.filter((t) => t !== "Other")); + setShowOtherInput(false); + return; + } + // Otherwise toggle showing the custom input setShowOtherInput((s) => !s); return; }