diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue index 6c2a875c8..25ef12656 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue @@ -74,8 +74,8 @@   {{ notification.title }} - - + + @@ -173,7 +173,7 @@ .catch(e => console.log(e)); } }, - async deleteNotification() { + async deleteNotification() { await axios.delete( '/api/notification/' + this.selectedNotification.notificationId + '?userNotificationId=' + this.selectedNotification.id) .catch(e => console.log(e)); diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue index 15229ade7..b21cb5698 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue @@ -87,7 +87,7 @@ @@ -143,6 +143,13 @@ $('#deleteModalButton').modal('hide'); $('#deleteModal').modal(); }, + closeConfirmation() { + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } + document.body.focus(); + setTimeout(() => { $('#deleteModal').modal('hide'); }, 10); + }, showNotification(notification: NotificationModel) { this.selectedNotification = notification; this.showMessage = true; @@ -155,7 +162,7 @@ }, async deleteNotification() { await this.getSelectedComponent().deleteNotification(); - $('#deleteModal').modal('hide'); + this.closeConfirmation(); this.showMessage = false; }, notificationTypeContent() {