fix(mail): Recipients with umlaut (ü) trigerred the end of string

With chrome and edge and a german keyboard, the ü was considered as a separator keycode when adding recipients
This commit is contained in:
Hivert Quentin
2023-05-15 15:12:44 +02:00
parent 1df2586745
commit 9c7ef089c2
4 changed files with 98 additions and 92 deletions
@@ -12,10 +12,10 @@
this.$onInit = function() {
$scope.isPopup = stateParent.isPopup;
this.account = stateAccount;
this.autocomplete = {to: {}, cc: {}, bcc: {}};
this.autosave = null;
this.isFullscreen = false;
this.hideBcc = (stateMessage.editable.bcc.length === 0);
this.hideCc = (stateMessage.editable.cc.length === 0);
@@ -218,6 +218,12 @@
$event.preventDefault();
return false;
}
if ($event.keyCode == 186 && $event.key == 'ü') { //Key code for separator ';' but is keycode for ü in german keyboard
$event.stopPropagation();
$event.preventDefault();
let element = $window.document.getElementById($event.target.id);
element.value = element.value + 'ü'
}
};
this.save = function (options) {