Fix add and drag drop attachments to minicards and card.

Thanks to xet7 !

Fixes #5946,
fixes #5436,
fixes #2936,
fixes #1926,
fixes #300,
fixes #142
This commit is contained in:
Lauri Ojansivu 2025-10-19 10:57:36 +03:00
parent cea414b589
commit b06daff4c7
6 changed files with 122 additions and 75 deletions

View file

@ -157,6 +157,15 @@ BlazeComponent.extendComponent({
} else {
$cards.sortable({
handle: '.minicard',
// Prevent sortable from interfering with file drag and drop
start: function(event, ui) {
// Check if this is a file drag operation
const dataTransfer = event.originalEvent?.dataTransfer;
if (dataTransfer && dataTransfer.types && dataTransfer.types.includes('Files')) {
// Cancel sortable for file drags
return false;
}
},
});
}