diff --git a/frontend/src/components/bucket/BucketTable.vue b/frontend/src/components/bucket/BucketTable.vue
index 9276f7b4..db9fb74f 100644
--- a/frontend/src/components/bucket/BucketTable.vue
+++ b/frontend/src/components/bucket/BucketTable.vue
@@ -65,6 +65,7 @@ const showPermissions = async (bucketId: string, bucketName: string) => {
};
const confirmDeleteBucket = (bucketId: string) => {
+ focusedElement.value = document.activeElement;
confirm.require({
message:
'Are you sure you want to delete this folder in BCBox? \
@@ -73,7 +74,8 @@ const confirmDeleteBucket = (bucketId: string) => {
header: 'Delete folder',
acceptLabel: 'Confirm',
rejectLabel: 'Cancel',
- accept: () => deleteBucket(bucketId)
+ accept: () => deleteBucket(bucketId),
+ onHide: () => onDialogHide()
});
};
@@ -344,7 +346,6 @@ watch(getBuckets, () => {
class="p-button-lg p-button-text p-button-danger"
aria-label="Delete folder"
@click="confirmDeleteBucket(node.data.bucketId)"
- @keyup.enter="confirmDeleteBucket(node.data.bucketId)"
>
diff --git a/frontend/src/components/object/DeleteObjectButton.vue b/frontend/src/components/object/DeleteObjectButton.vue
index 22ef6b70..26a848e0 100644
--- a/frontend/src/components/object/DeleteObjectButton.vue
+++ b/frontend/src/components/object/DeleteObjectButton.vue
@@ -1,10 +1,13 @@