From dbd71c15d1a3d1925f19621b882857f481b7b0c7 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Tue, 23 Apr 2024 16:53:09 -0300 Subject: [PATCH] Fixes issues with draggable components on Chrome. --- src/views/admin/components/lists/collection-metadata-list.vue | 4 ++-- src/views/admin/components/lists/repository-metadata-list.vue | 2 +- .../metadata-types/compound/child-metadata-list.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/admin/components/lists/collection-metadata-list.vue b/src/views/admin/components/lists/collection-metadata-list.vue index f3b32337e..bd7b1f8fb 100644 --- a/src/views/admin/components/lists/collection-metadata-list.vue +++ b/src/views/admin/components/lists/collection-metadata-list.vue @@ -682,7 +682,7 @@ export default { if ( !$event.from.classList.contains('active-metadata-area') ) { this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex); - $event.originalTarget.removeChild($event.item) + $event.to.removeChild($event.item) } else { this.isLoadingMetadataSections = true; @@ -698,7 +698,7 @@ export default { newMetadataSectionsList[previousSectionIndex].metadata_object_list = previousSectionMetadataObjectList; this.updateMetadataSections(newMetadataSectionsList); - $event.originalTarget.removeChild($event.item); + $event.to.removeChild($event.item); this.updateMetadatum({ collectionId: this.collectionId, diff --git a/src/views/admin/components/lists/repository-metadata-list.vue b/src/views/admin/components/lists/repository-metadata-list.vue index c10c53550..c17f8eda2 100644 --- a/src/views/admin/components/lists/repository-metadata-list.vue +++ b/src/views/admin/components/lists/repository-metadata-list.vue @@ -371,7 +371,7 @@ export default { case 'add': if ( !$event.from.classList.contains('active-metadata-area') ) { this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex); - $event.originalTarget.removeChild($event.item); + $event.to.removeChild($event.item); } break; case 'remove': diff --git a/src/views/admin/components/metadata-types/compound/child-metadata-list.vue b/src/views/admin/components/metadata-types/compound/child-metadata-list.vue index 9b1bcf63b..e72ad2dac 100644 --- a/src/views/admin/components/metadata-types/compound/child-metadata-list.vue +++ b/src/views/admin/components/metadata-types/compound/child-metadata-list.vue @@ -338,7 +338,7 @@ case 'add': if ( !$event.from.classList.contains('active-metadata-area') ) { this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex); - $event.originalTarget.removeChild($event.item); + $event.to.removeChild($event.item); } break; case 'remove':