View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004103SOGoGUIpublic2017-03-23 16:472018-02-13 05:45
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004103: email input termination by coma button shortcut
DescriptionWhen you start typing a user name in the "TO" field, the search for the address book starts, at the same time, if the name of the user has a symbol that is located on the "," key, the search completion is triggered. This behavior leads to the impossibility of selecting users with the Russian letter B in the name, because it is placed on the same button as the "," symbol in the English keyboard layout. Thus, it is not possible to write a letter to the user with the letter B.
TagsNo tags attached.
Attached Filespng file icon screen.png [^] (82,489 bytes) 2017-03-23 16:47

patch file icon 0001-fix-chips-keypress-handler-for-chips-separator-keys.patch [^] (9,603 bytes) 2018-02-06 17:55 [Show Content]
patch file icon 0001-MessageEditorController.js-use-comma-and-semicolon-c.patch [^] (1,695 bytes) 2018-02-06 17:57 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
duplicate of 0003513resolvedfrancis "To" field automatically add address when "@" is writed into field on Chrome and Safari 
has duplicate 0004109new Address book search fails 

-  Notes
alaniyatm (reporter)
2017-03-27 15:07

Basically, i found that keycode 188 triggers autocomplete function.

In file UIxMailEditor.wox (line 70,104,137) for fileds 'To,CC,BCC' are used md-separator-keys="editor.recipientSeparatorKeys".

i resolved this (on lab) by deleting the 188 code from angular-material.js (line: 409) and angular-material.min (line: ...KEY_CODE:{COMMA:188...)

also my colleague found the function that overrides entered COMMA to the $mdConstant.KEY_CODE.ENTER [^]

What should i do next? Make a custom fix for me?
User avatar (0011598)
francis (administrator)
2017-03-27 18:16

Check my comments in ticket 0003513.
Ivan Zakharyaschev (reporter)
2018-02-06 17:52

I've found a patch by Volker Braun for the old angular-material which might be helpful to solve this problem: allow chars as chips separators (besides keycodes).

It's in [^] , branch chips-separator-keys; more links: [^] [^] [^]

I've rebased it onto the commit of angular-material checked-in as a submodule in SOGo-3.2.10 -- [^] .

I've committed the changes to the SOGo code relying on this feature:;a=shortlog;h=refs/heads/chips-separator-keys [^] .

But I didn't manage to make the SOGo build system recompile the JS so that the changes take effect --

So, I haven't yet tested whether this feature would actually work. I need help from the developers of SOGo in this.

Can you please tell me how to change UI/WebServerResources/angular-material/ sources and then recompile so that the changes take effect?

Example of what I did to try out some changes (an attempt to fix a problem reported several times like [^] and test the new code) and it didn't work, i.e. they didn't take effect:

Updated the submodule UI/WebServerResources/angular-material and committed the new changes -- [^] .

Committed the new submodule state -- the second top commit 0d8ef8fca38e4df3f202c2d05f980e678076f57e in;a=shortlog;h=refs/heads/chips-separator-keys [^] .
Read Documentation/SOGoDevelopersGuide.asciidoc (section: Building frontend), did all the commands (npm etc.)

Run make -C UI/WebServerResources prod .

The result: it regenerated and committed some JS files -- in cdf0a77f681bcb9006217e2971e025251dfecefd , second top in;a=shortlog;h=refs/heads/altM/80P [^] .

But the changed angular-material code didn't get into the result. To check:

$ cd UI/WebServerResources/angular-material/
$ git --no-pager grep -iFe inputKeypress
src/components/chips/js/chipsController.js:MdChipsCtrl.prototype.inputKeypress = function(event) {
src/components/chips/js/chipsController.js: * Common code for both inputKeydown and inputKeypress
src/components/chips/js/chipsController.js: .on('keypress', function(event) { scopeApplyFn(event, ctrl.inputKeypress) })
src/components/chips/js/chipsDirective.js: ng-keypress="$mdChipsCtrl.inputKeypress($event)"\
$ cd ..
$ git --no-pager grep -iFe inputKeypress | wc -l

Compare that to the old code:

$ cd UI/WebServerResources/angular-material/
$ git --no-pager grep -iFe inputKeydown
src/components/chips/chips.spec.js: ctrl.inputKeydown(event);
src/components/chips/js/chipsController.js:MdChipsCtrl.prototype.inputKeydown = function(event) {
src/components/chips/js/chipsController.js: * Common code for both inputKeydown and inputKeypress
src/components/chips/js/chipsController.js: .on('keydown', function(event) { scopeApplyFn(event, ctrl.inputKeydown) })
src/components/chips/js/chipsDirective.js: ng-keydown="$mdChipsCtrl.inputKeydown($event)">';
$ cd ..
$ git --no-pager grep -iFe inputKeydown | wc -l
User avatar (0012575)
francis (administrator)
2018-02-06 20:29

We use the source code of Material only to build the CSS. The pre-build JavaScript library is retrieved through bower.

If you modify the JavaScript of ng-material, you must follow their procedure: [^]
Ivan Zakharyaschev (reporter)
2018-02-07 05:14

> We use the source code of Material only to build the CSS. The pre-build JavaScript library is retrieved through bower.

Thanks for the clarification! I'll try the bower way to test whether this patch helps.

Isn't that strange/Doesn't that add some inconsistency to the project: one source of angular-material is used for one purpose, but another revision -- for the other purpose? Can't they get too much different so that the CSS wouldn't match the other components?
User avatar (0012580)
francis (administrator)
2018-02-07 06:41

No. We make sure the versioning matches between the two sources.

We could eventually rely exclusively on the source code but there's no advantage for now.
Ivan Zakharyaschev (reporter)
2018-02-13 05:45

Well, I've determined how to compile my own version of the bower-material/ tree (with my changes). Like this (a draft of a rule in UI/WebServerResources/GNUmakefile):

    cd angular-material && npm install
    cd angular-material && ./scripts/ \
      --git_push_dryrun=true --verbose=true --version=1.1.4
    # TODO: Then make bower use a copy of the result in
    # angular-material/bower-material/ as bower_components/bower-material/
    # (Either copy directly or play with bower.json.)

- Issue History
Date Modified Username Field Change
2017-03-23 16:47 alaniyatm New Issue
2017-03-23 16:47 alaniyatm File Added: screen.png
2017-03-27 04:52 Christian Mack Relationship added has duplicate 0004109
2017-03-27 06:26 francis Relationship added duplicate of 0003513
2017-03-27 15:07 alaniyatm Note Added: 0011597
2017-03-27 18:16 francis Note Added: 0011598
2017-03-29 08:55 ludovic Severity major => minor
2018-02-06 17:52 Ivan Zakharyaschev Note Added: 0012573
2018-02-06 17:55 Ivan Zakharyaschev File Added: 0001-fix-chips-keypress-handler-for-chips-separator-keys.patch
2018-02-06 17:57 Ivan Zakharyaschev File Added: 0001-MessageEditorController.js-use-comma-and-semicolon-c.patch
2018-02-06 20:29 francis Note Added: 0012575
2018-02-07 05:14 Ivan Zakharyaschev Note Added: 0012579
2018-02-07 06:41 francis Note Added: 0012580
2018-02-13 05:45 Ivan Zakharyaschev Note Added: 0012594

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker