From 6903c19ff6c57b74ecd24264e35ba8826f30fc60 Mon Sep 17 00:00:00 2001
From: Ivan Zakharyaschev <imz@altlinux.org>
Date: Thu, 25 Jan 2018 14:58:37 +0300
Subject: [PATCH] MessageEditorController.js: use comma and semicolon *chars*
 rather than *keycodes* as separators

This fixes entering some letters (for example, Cyrillic Be or Zhe) in the
address fields (like To:) of the message editor so that they do not act as
"separator" keys (like comma or semicolon) any more; this error's cause
was that these letters and the separators are on the same physical keys.

(Thanks Volker Braun for implementing the underlying feature
for this fix in the old unsupported angular-material.)

Fixes:

* https://sogo.nu/bugs/view.php?id=4103
* https://sogo.nu/bugs/view.php?id=3573
* https://sogo.nu/bugs/view.php?id=3513
* https://lists.inverse.ca/sogo/arc/users/2016-07/msg00032.html
* https://sogo.nu/bugs/view.php?id=4109 (probably, too,
  although the bug report is not clear enough)
---
 UI/WebServerResources/js/Mailer/MessageEditorController.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UI/WebServerResources/js/Mailer/MessageEditorController.js b/UI/WebServerResources/js/Mailer/MessageEditorController.js
index 7c5524d..b39c922 100644
--- a/UI/WebServerResources/js/Mailer/MessageEditorController.js
+++ b/UI/WebServerResources/js/Mailer/MessageEditorController.js
@@ -24,8 +24,8 @@
     vm.recipientSeparatorKeys = [
       $mdConstant.KEY_CODE.ENTER,
       $mdConstant.KEY_CODE.TAB,
-      $mdConstant.KEY_CODE.COMMA,
-      $mdConstant.KEY_CODE.SEMICOLON
+      ',',
+      ';'
     ];
     vm.removeAttachment = removeAttachment;
     vm.save = save;
-- 
2.10.2

