[PR #16763] [CLOSED] notes: prevent title caret jump by ignoring socket title updates while input focused #24231

Closed
opened 2026-04-20 05:17:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16763
Author: @elijah-g
Created: 8/21/2025
Status: Closed

Base: mainHead: fix/notes-title-caret-jump


📝 Commits (1)

  • 0a06a51 notes: prevent title caret jump by ignoring socket title updates while input focused\n\nWhen multiple clients or background processes update the note title via socket, the local input was being overwritten mid-typing, causing character deletion and cursor jumps.\n\nGuard server-driven title updates in NoteEditor.svelte to avoid overwriting while the title input is focused.

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/lib/components/notes/NoteEditor.svelte (+2 -1)

📄 Description

Problem
When editing a note title, characters could be deleted and the cursor would jump unexpectedly. This happened because real-time “note-events” (socket) updates were overwriting the local input value while the user was actively typing, resetting the input and caret.

Fix
In src/lib/components/notes/NoteEditor.svelte, guard applying server-driven title updates while the title input is focused:
• Only update note.title from socket if the input is not focused and the incoming title differs.

Why this helps
This avoids mid-typing overwrites that caused the caret to move and occasional character loss while preserving real-time updates when the user isn’t editing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/16763 **Author:** [@elijah-g](https://github.com/elijah-g) **Created:** 8/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/notes-title-caret-jump` --- ### 📝 Commits (1) - [`0a06a51`](https://github.com/open-webui/open-webui/commit/0a06a515e3ec1f118be4adce89601c38ad695f46) notes: prevent title caret jump by ignoring socket title updates while input focused\n\nWhen multiple clients or background processes update the note title via socket, the local input was being overwritten mid-typing, causing character deletion and cursor jumps.\n\nGuard server-driven title updates in NoteEditor.svelte to avoid overwriting while the title input is focused. ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/notes/NoteEditor.svelte` (+2 -1) </details> ### 📄 Description Problem When editing a note title, characters could be deleted and the cursor would jump unexpectedly. This happened because real-time “note-events” (socket) updates were overwriting the local input value while the user was actively typing, resetting the input and caret. Fix In src/lib/components/notes/NoteEditor.svelte, guard applying server-driven title updates while the title input is focused: • Only update note.title from socket if the input is not focused and the incoming title differs. Why this helps This avoids mid-typing overwrites that caused the caret to move and occasional character loss while preserving real-time updates when the user isn’t editing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 05:17:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#24231