mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #16763] [CLOSED] notes: prevent title caret jump by ignoring socket title updates while input focused #11029
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/16763
Author: @elijah-g
Created: 8/21/2025
Status: ❌ Closed
Base:
main← Head:fix/notes-title-caret-jump📝 Commits (1)
0a06a51notes: 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.