diff --git a/UI/WebServerResources/js/Mailer/sgMailboxListItem.directive.js b/UI/WebServerResources/js/Mailer/sgMailboxListItem.directive.js index 828fbb19b..a36a4015b 100644 --- a/UI/WebServerResources/js/Mailer/sgMailboxListItem.directive.js +++ b/UI/WebServerResources/js/Mailer/sgMailboxListItem.directive.js @@ -111,19 +111,21 @@ this.editFolder = function($event) { $event.stopPropagation(); $event.preventDefault(); - this.editMode = true; - this.inputElement.value = this.mailbox.name; - this.clickableElement.classList.add('ng-hide'); - this.inputContainer.classList.remove('ng-hide'); - if ($event.srcEvent && $event.srcEvent.type == 'touchend') { - $timeout(function() { - $ctrl.inputElement.select(); - $ctrl.inputElement.focus(); - }, 200); // delayed focus for iOS - } - else { - this.inputElement.select(); - this.inputElement.focus(); + if (this.mailbox.$isEditable) { + this.editMode = true; + this.inputElement.value = this.mailbox.name; + this.clickableElement.classList.add('ng-hide'); + this.inputContainer.classList.remove('ng-hide'); + if ($event.srcEvent && $event.srcEvent.type == 'touchend') { + $timeout(function() { + $ctrl.inputElement.select(); + $ctrl.inputElement.focus(); + }, 200); // delayed focus for iOS + } + else { + this.inputElement.select(); + this.inputElement.focus(); + } } if (this.panel) { this.panel.close();