diff --git a/ghost/admin/views/base.js b/ghost/admin/views/base.js index 030d3d2820..8b9d439dfb 100644 --- a/ghost/admin/views/base.js +++ b/ghost/admin/views/base.js @@ -193,7 +193,7 @@ this.renderItem(item); }, clearEverything: function () { - this.$el.find('.js-notification.notification-passive').remove(); + this.$el.find('.js-notification.notification-passive').parent().remove(); }, removeItem: function (e) { e.preventDefault(); @@ -218,6 +218,7 @@ $(this) .show() .css({height: "auto"}) + .parent() .remove(); }); } diff --git a/ghost/admin/views/login.js b/ghost/admin/views/login.js index e16a5531db..da9b24d9b7 100644 --- a/ghost/admin/views/login.js +++ b/ghost/admin/views/login.js @@ -45,6 +45,7 @@ window.location.href = msg.redirect; }, error: function (xhr) { + Ghost.notifications.clearEverything(); Ghost.notifications.addItem({ type: 'error', message: Ghost.Views.Utils.getRequestErrorMessage(xhr), @@ -102,6 +103,7 @@ window.location.href = msg.redirect; }, error: function (xhr) { + Ghost.notifications.clearEverything(); Ghost.notifications.addItem({ type: 'error', message: Ghost.Views.Utils.getRequestErrorMessage(xhr), @@ -153,6 +155,7 @@ window.location.href = msg.redirect; }, error: function (xhr) { + Ghost.notifications.clearEverything(); Ghost.notifications.addItem({ type: 'error', message: Ghost.Views.Utils.getRequestErrorMessage(xhr),