[GH-ISSUE #22783] issue: Memory Deletion Unexpectedly Triggers Edit Modal Due to Event Bubbling #35345

Closed
opened 2026-04-25 09:34:12 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @silentoplayz on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22783

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

v0.18.0

Operating System

Ubuntu 24.04.4 LTS

Browser (if applicable)

Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (64-bit)

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Clicking the Delete (trash can/bin) icon in the Memory Manage modal should:

  1. Delete the memory entry successfully.
  2. (Optional/Better) Ask for confirmation before deletion.
  3. NOT open the Edit Memory modal.
  4. Update the memory list UI without errors.

Actual Behavior

When clicking the Delete (trash can/bin) icon for a specific memory:

  1. The memory is deleted successfully (a success toast shows "Memory deleted successfully").
  2. Simultaneously, the Edit Memory modal for that entry is triggered and opens.
  3. If the user then clicks Update inside this ghost modal, a Memory Not found notification toast is thrown, accompanied by a 404 error in the console.
XHR POST http://localhost:1337/api/v1/memories/45f3bd45-e3e1-4fa1-ba23-6808b1e684eb/update
[HTTP/1.1 404 Not Found 17ms]

Steps to Reproduce

  1. Navigate to Settings > Personalization.
  2. Click Manage under the Memory (Experimental) section to open the ManageModal.
  3. Locate any existing memory entry in the list.
  4. Click the Delete (trash can) icon in the entry's actions (right side).
  5. Notice that the "Memory deleted successfully" toast appears, but the Edit Memory modal for the same entry pops up.
  6. Click Update in the triggered modal.
  7. Observe the console 404 error and the Memory Not found toast.

Logs & Screenshots

Console Log:

XHR POST http://localhost:1337/api/v1/memories/45f3bd45-e3e1-4fa1-ba23-6808b1e684eb/update [HTTP/1.1 404 Not Found 17ms]

Screenshots:

Image Image

Additional Information

This is a classic event bubbling issue in src/lib/components/chat/Settings/Personalization/ManageModal.svelte. The list item div has an on:click handler that triggers the Edit Modal:

<div
    class="w-full flex justify-between items-center rounded-xl text-sm py-2 px-3 hover:bg-gray-50 dark:hover:bg-gray-850 transition cursor-pointer"
    on:click={() => {
        selectedMemory = memory;
        showEditMemoryModal = true;
    }}
>

The buttons (Edit/Delete) inside this div do not use e.stopPropagation() (or on:click|stopPropagation), so clicking any action also fires the parent on:click event.

Originally created by @silentoplayz on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22783 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) v0.18.0 ### Operating System Ubuntu 24.04.4 LTS ### Browser (if applicable) Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (64-bit) ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Clicking the `Delete` (trash can/bin) icon in the Memory Manage modal should: 1. Delete the memory entry successfully. 2. (Optional/Better) Ask for confirmation before deletion. 3. **NOT** open the Edit Memory modal. 4. Update the memory list UI without errors. ### Actual Behavior When clicking the `Delete` (trash can/bin) icon for a specific memory: 1. The memory is deleted successfully (a success toast shows "Memory deleted successfully"). 2. Simultaneously, the `Edit Memory` modal for that entry is triggered and opens. 3. If the user then clicks `Update` inside this ghost modal, a `Memory Not found` notification toast is thrown, accompanied by a 404 error in the console. ```JS XHR POST http://localhost:1337/api/v1/memories/45f3bd45-e3e1-4fa1-ba23-6808b1e684eb/update [HTTP/1.1 404 Not Found 17ms] ``` ### Steps to Reproduce 1. Navigate to **Settings** > **Personalization**. 2. Click **Manage** under the **Memory (Experimental)** section to open the `ManageModal`. 3. Locate any existing memory entry in the list. 4. Click the **Delete** (trash can) icon in the entry's actions (right side). 5. Notice that the "Memory deleted successfully" toast appears, but the **Edit Memory** modal for the same entry pops up. 6. Click **Update** in the triggered modal. 7. Observe the console 404 error and the `Memory Not found` toast. ### Logs & Screenshots **Console Log**: ```js XHR POST http://localhost:1337/api/v1/memories/45f3bd45-e3e1-4fa1-ba23-6808b1e684eb/update [HTTP/1.1 404 Not Found 17ms] ``` **Screenshots**: <img width="1988" height="1020" alt="Image" src="https://github.com/user-attachments/assets/9f13f88a-1e64-448e-977f-0bbb0a5499c1" /> <img width="1988" height="1020" alt="Image" src="https://github.com/user-attachments/assets/b14333f3-c9c0-428c-a4c6-fe34be52bcf7" /> ### Additional Information This is a classic event bubbling issue in `src/lib/components/chat/Settings/Personalization/ManageModal.svelte`. The list item `div` has an `on:click` handler that triggers the Edit Modal: ```svelte <div class="w-full flex justify-between items-center rounded-xl text-sm py-2 px-3 hover:bg-gray-50 dark:hover:bg-gray-850 transition cursor-pointer" on:click={() => { selectedMemory = memory; showEditMemoryModal = true; }} > ``` The buttons (Edit/Delete) inside this `div` do not use `e.stopPropagation()` (or `on:click|stopPropagation`), so clicking any action also fires the parent `on:click` event.
GiteaMirror added the bugconfirmed issue labels 2026-04-25 09:34:13 -05:00
Author
Owner

@tjbck commented on GitHub (Mar 20, 2026):

Addressed in dev.

<!-- gh-comment-id:4101478432 --> @tjbck commented on GitHub (Mar 20, 2026): Addressed in dev.
Author
Owner

@silentoplayz commented on GitHub (Mar 20, 2026):

Addressed in dev.

Thanks! I can confirm that fe772d95e2 resolves the issue as expected.

<!-- gh-comment-id:4101502841 --> @silentoplayz commented on GitHub (Mar 20, 2026): > Addressed in dev. Thanks! I can confirm that https://github.com/open-webui/open-webui/commit/fe772d95e2a931ee89f4c7d6026f7415e9773b7a resolves the issue as expected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35345