Disable the escape key in the "confirm discard" dialog
This commit is contained in:
@@ -286,11 +286,11 @@ Opens an overlay to show a custom YSOD. </br>
|
||||
|
||||
$(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();
|
||||
});
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user