diff --git a/frontend/components/Tag/TagInput.tsx b/frontend/components/Tag/TagInput.tsx index 5b245b2..30f11d5 100644 --- a/frontend/components/Tag/TagInput.tsx +++ b/frontend/components/Tag/TagInput.tsx @@ -152,6 +152,14 @@ const TagInput: React.FC = ({ event.preventDefault(); addNewTag(inputValue.trim()); } + } else if (event.key === 'Backspace') { + // Remove the last tag if input is empty and there are tags + if (inputValue === '' && tags.length > 0) { + event.preventDefault(); + const updatedTags = tags.slice(0, -1); + setTags(updatedTags); + onTagsChange(updatedTags); + } } };