bug: Settings modal should not close when dragging from inside of modal #760

Closed
opened 2025-11-11 14:30:45 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @domsleee on GitHub (Apr 29, 2024).

Bug Report

Description

The modal closes unexpectedly on mouseup when dragging from inside the modal.
For example, when highlighting text from within the modal, mousedown is on the foreground and mouseup is on the backdrop. It should not close in this case:

open-webui-mouseup-close-small

Expected Behavior:
In this case, the modal should stay open.

Actual Behavior:
The modal closes.

Environment

  • Open WebUI Version: 0.1.122

  • Ollama (if applicable): 0.1.32

  • Operating System: Windows 10

  • Browser (if applicable): Chrome

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Installation Method

Normal docker way:

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Suggested fix

It seems reasonable to follow the ChatGPT UI here and use the mousedown event instead of the click event.

Originally created by @domsleee on GitHub (Apr 29, 2024). # Bug Report ## Description The modal closes unexpectedly on `mouseup` when dragging from inside the modal. For example, when highlighting text from within the modal, `mousedown` is on the foreground and `mouseup` is on the backdrop. It should not close in this case: ![open-webui-mouseup-close-small](https://github.com/open-webui/open-webui/assets/14891742/9ce8dde4-0b97-4fc3-8110-3a9202c44786) **Expected Behavior:** In this case, the modal should stay open. **Actual Behavior:** The modal closes. ## Environment - **Open WebUI Version:** 0.1.122 - **Ollama (if applicable):** 0.1.32 - **Operating System:** Windows 10 - **Browser (if applicable):** Chrome **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Installation Method Normal `docker` way: > docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main ## Suggested fix It seems reasonable to follow the ChatGPT UI here and use the `mousedown` event instead of the `click` event.
Author
Owner

@justinh-rahb commented on GitHub (Apr 29, 2024):

I love it when people close their own issues with a PR 👍

Great contribution @domsleee, thank you! 🙏

@justinh-rahb commented on GitHub (Apr 29, 2024): I love it when people close their own issues with a PR 👍 Great contribution @domsleee, thank you! 🙏
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#760