From dc1bc41d2edc022dbae11db2159cedb5369c68cd Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Mon, 29 Jun 2026 13:05:39 -0400 Subject: [PATCH] fix(ui): fix pinned note sidebar drag-and-drop into chat context (#26384) --- .../layout/Sidebar/PinnedNoteList.svelte | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/components/layout/Sidebar/PinnedNoteList.svelte b/src/lib/components/layout/Sidebar/PinnedNoteList.svelte index 9eeaa89c8d..7b5223365b 100644 --- a/src/lib/components/layout/Sidebar/PinnedNoteList.svelte +++ b/src/lib/components/layout/Sidebar/PinnedNoteList.svelte @@ -28,6 +28,16 @@ if (pinnedNotesList && !$mobile) { new Sortable(pinnedNotesList, { animation: 150, + setData: function (dataTransfer, dragEl) { + dataTransfer.setData( + 'text/plain', + JSON.stringify({ + type: 'note', + id: dragEl.dataset.id + }) + ); + dataTransfer.setData('application/x-open-webui-drag', ''); + }, onUpdate: async (event) => { const noteId = event.item.dataset.id; const newIndex = event.newIndex; @@ -54,16 +64,6 @@
{ - e.dataTransfer.setData( - 'text/plain', - JSON.stringify({ - type: 'note', - id: note.id - }) - ); - }} >