the embed chatbot can't drag when use mouse #13354

Closed
opened 2026-02-21 19:11:47 -05:00 by yindo · 1 comment
Owner

Originally created by @hjlarry on GitHub (Apr 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

1.3.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Image
Dragging works only with touch input, not with a mouse.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @hjlarry on GitHub (Apr 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 1.3.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/0b0e218e-566d-42f1-912e-b1dacf8fd45b) Dragging works only with touch input, not with a mouse. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:11:47 -05:00
yindo closed this issue 2026-02-21 19:11:47 -05:00
Author
Owner

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

The issue you're experiencing, where the embed chatbot can't be dragged using a mouse, might be related to the event listeners for mouse events in the Dify codebase. The drag-and-drop functionality is implemented in the web/public/embed.js file. It uses mousedown, mousemove, and mouseup events to handle mouse interactions for dragging [1].

Here are a few things you can check or try:

  1. Ensure Event Listeners are Active: Verify that the mousedown, mousemove, and mouseup event listeners are correctly attached to the element you are trying to drag. These listeners are crucial for enabling drag functionality with a mouse.

  2. Check for JavaScript Errors: Open your browser's developer console to see if there are any JavaScript errors that might be preventing the drag functionality from working.

  3. Cross-Browser Testing: Test the functionality in different browsers to see if the issue is browser-specific.

  4. CSS Interference: Ensure that there are no CSS styles that might be interfering with the drag functionality, such as pointer-events: none;.

If these steps don't resolve the issue, you might want to review the implementation in web/public/embed.js to ensure that the logic for handling mouse events is correctly implemented and not being overridden or blocked by other scripts or styles.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Apr 25, 2025): <!-- Answer --> The issue you're experiencing, where the embed chatbot can't be dragged using a mouse, might be related to the event listeners for mouse events in the Dify codebase. The drag-and-drop functionality is implemented in the `web/public/embed.js` file. It uses `mousedown`, `mousemove`, and `mouseup` events to handle mouse interactions for dragging <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/public/embed.js)</sup>. Here are a few things you can check or try: 1. **Ensure Event Listeners are Active**: Verify that the `mousedown`, `mousemove`, and `mouseup` event listeners are correctly attached to the element you are trying to drag. These listeners are crucial for enabling drag functionality with a mouse. 2. **Check for JavaScript Errors**: Open your browser's developer console to see if there are any JavaScript errors that might be preventing the drag functionality from working. 3. **Cross-Browser Testing**: Test the functionality in different browsers to see if the issue is browser-specific. 4. **CSS Interference**: Ensure that there are no CSS styles that might be interfering with the drag functionality, such as `pointer-events: none;`. If these steps don't resolve the issue, you might want to review the implementation in `web/public/embed.js` to ensure that the logic for handling mouse events is correctly implemented and not being overridden or blocked by other scripts or styles. <!-- 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/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/65c9f6bd-d7dc-4779-8ed7-be5761aba8c1?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#13354