fix(mail(js)): don't allow to rename special mailboxes

This commit is contained in:
Francis Lachapelle
2021-12-01 14:31:17 -05:00
parent 8afc80d82e
commit c3c9432cc2

View File

@@ -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();