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:
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.
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:

**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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @domsleee on GitHub (Apr 29, 2024).
Bug Report
Description
The modal closes unexpectedly on
mouseupwhen dragging from inside the modal.For example, when highlighting text from within the modal,
mousedownis on the foreground andmouseupis on the backdrop. It should not close in this case: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:
Installation Method
Normal
dockerway:Suggested fix
It seems reasonable to follow the ChatGPT UI here and use the
mousedownevent instead of theclickevent.@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! 🙏