diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js index e65a3d238c2a..8c32d93c01d7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js @@ -286,11 +286,11 @@ Opens an overlay to show a custom YSOD.
$(document).on("keydown.overlay-" + overlayNumber, function(event) { - if (event.which === 27) { + if (event.which === 27) { numberOfOverlays = overlayHelper.getNumberOfOverlays(); - if (numberOfOverlays === overlayNumber) { + if (numberOfOverlays === overlayNumber && !scope.model.disableEscKey) { scope.$apply(function () { scope.closeOverLay(); }); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js index 29920ebf00b6..a53fb75d938a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js @@ -165,6 +165,7 @@ function valFormManager(serverValidationManager, $rootScope, $timeout, $location "title": labels.unsavedChangesTitle, "content": labels.unsavedChangesContent, "disableBackdropClick": true, + "disableEscKey": true, "submitButtonLabel": labels.stayButton, "closeButtonLabel": labels.discardChangesButton, submit: function() {