Jake Vanderwerf
2026-01-04 a81f7043fc44382775f9afac48e4c7a651e7ac6c
assets/js/concise/UploadManager.js
@@ -1279,7 +1279,7 @@
      const grid = element.querySelector('.item-grid');
      if (grid) {
         grid.dataset.groupId = groupId;
         this.createSortableForGrid(fieldId, grid, groupId);
         this.createSortable(fieldId, grid, groupId);
      }
      let storedData = this.stores.groups.data.has(groupId)
@@ -1587,7 +1587,25 @@
         chosenClass: 'chosen',
         dragClass: 'dragging',
         onStart: () => this.syncSortableSelection(fieldId),
         onStart: (evt) => {
            // Get the dragged item's ID
            const draggedItem = evt.item;
            const uploadId = draggedItem?.dataset.uploadId;
            // Get the selected items Set for this field
            const selectedItems = this.selected.get(fieldId);
            // If the dragged item isn't selected, select it
            if (uploadId && (!selectedItems || !selectedItems.has(uploadId))) {
               const handler = this.selectionHandlers.get(fieldId);
               if (handler) {
                  handler.select(uploadId);
               }
            }
            // Sync all selections to Sortable
            this.syncSortableSelection(fieldId);
         },
         onEnd: (evt) => this.sortableDrop(evt, fieldId),
      });
@@ -1739,6 +1757,10 @@
         })
      ]);
      if (this.restoreModal) {
         this.cleanupRestore();
      }
      this.a11y.announce('Cache cleared for this page');
   }