Unexpected tag creation when pressing enter during tag conversion #7890

Closed
opened 2026-02-21 18:22:55 -05:00 by yindo · 1 comment
Owner

Originally created by @miya on GitHub (Jan 25, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Access /apps
  2. Hover over any App
  3. Click "Add tag"
  4. Click "Manage Tags"
  5. Enter text that needs conversion, press enter to confirm the conversion

https://github.com/user-attachments/assets/3d17672f-800a-4a91-aa6c-892032a66daa

✔️ Expected Behavior

Prevent tag creation when pressing enter to confirm text conversion

Actual Behavior

Tag is created when pressing enter to confirm text conversion

Originally created by @miya on GitHub (Jan 25, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Access /apps 1. Hover over any App 1. Click "Add tag" 1. Click "Manage Tags" 1. Enter text that needs conversion, press enter to confirm the conversion https://github.com/user-attachments/assets/3d17672f-800a-4a91-aa6c-892032a66daa ### ✔️ Expected Behavior Prevent tag creation when pressing enter to confirm text conversion ### ❌ Actual Behavior Tag is created when pressing enter to confirm text conversion
yindo added the 🐞 bugcloud labels 2026-02-21 18:22:55 -05:00
yindo closed this issue 2026-02-21 18:22:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 25, 2025):

Hello, @miya! I'm here to help you with bug reports, questions, and becoming a contributor. Let's work together to solve this issue.

The issue you're experiencing with unexpected tag creation when pressing 'Enter' during tag conversion is related to the conditional logic in the code. The behavior is determined by the customizedConfirmKey prop and the isSpecialMode variable. If isSpecialMode is false and the customizedConfirmKey is set to 'Enter', the code will attempt to add the trimmed input value as a new tag if it meets certain conditions (not empty, not already in the list, and not longer than 20 characters) [1].

To address this issue, you might need to adjust the logic to differentiate between confirming text conversion and creating a new tag. This could involve modifying the conditions under which a tag is created when the 'Enter' key is pressed, especially in scenarios where text conversion is intended.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 25, 2025): <!-- Greeting --> Hello, @miya! I'm here to help you with bug reports, questions, and becoming a contributor. Let's work together to solve this issue. <!-- Answer --> The issue you're experiencing with unexpected tag creation when pressing 'Enter' during tag conversion is related to the conditional logic in the code. The behavior is determined by the `customizedConfirmKey` prop and the `isSpecialMode` variable. If `isSpecialMode` is `false` and the `customizedConfirmKey` is set to `'Enter'`, the code will attempt to add the trimmed input value as a new tag if it meets certain conditions (not empty, not already in the list, and not longer than 20 characters) <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/base/tag-input/index.tsx)</sup>. To address this issue, you might need to adjust the logic to differentiate between confirming text conversion and creating a new tag. This could involve modifying the conditions under which a tag is created when the 'Enter' key is pressed, especially in scenarios where text conversion is intended. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/2fede511-28f1-44d1-a8c0-15521a14e890?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7890