mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-28 08:09:27 -05:00
fix: a file dropped onto a note is added to the note again (#34359)
This commit is contained in:
1 file changed
+8
-1
@@ -845,7 +845,14 @@
|
||||
export const dropChat = (event: DragEvent) => {
|
||||
const bounds = chatDropBounds(event);
|
||||
clearChatDropPreview();
|
||||
if (event.dataTransfer?.types.includes('Files')) event.preventDefault();
|
||||
if (
|
||||
event.dataTransfer?.types.includes('Files') &&
|
||||
!(
|
||||
event.target instanceof Element &&
|
||||
event.target.closest('[id="note-content-container"] [contenteditable="true"]')
|
||||
)
|
||||
)
|
||||
event.preventDefault();
|
||||
if (!bounds || pendingTabDrop) return;
|
||||
const internalId = event.dataTransfer?.getData('application/x-chat-panel-tab');
|
||||
let savedId = '';
|
||||
|
||||
Reference in new issue
Block a user