summary refs log tree commit diff
path: root/webclient/room/room-directive.js
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-05 20:39:57 +0100
committerErik Johnston <erik@matrix.org>2014-09-05 20:39:57 +0100
commit1c7bb34ffd564dca9f0b761a75f7cda348fdefeb (patch)
tree1e30e9277e212b288a5a1f30dcb953e7d947ba40 /webclient/room/room-directive.js
parentEmpty string is not a valid JSON object, so don't return them in HTTP responses. (diff)
parentBF: tab completion did not work with commands. $scope.input contained only th... (diff)
downloadsynapse-1c7bb34ffd564dca9f0b761a75f7cda348fdefeb.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'webclient/room/room-directive.js')
-rw-r--r--webclient/room/room-directive.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/webclient/room/room-directive.js b/webclient/room/room-directive.js
index 659bcbc60f..e033b003e1 100644
--- a/webclient/room/room-directive.js
+++ b/webclient/room/room-directive.js
@@ -48,6 +48,9 @@ angular.module('RoomController')
                 var search = /@?([a-zA-Z0-9_\-:\.]+)$/.exec(text);
                 if (targetIndex === 0) {
                     element[0].value = text;
+                    
+                    // Force angular to wake up and update the input ng-model by firing up input event
+                    angular.element(element[0]).triggerHandler('input');
                 }
                 else if (search && search[1]) {
                     // console.log("search found: " + search);
@@ -81,7 +84,10 @@ angular.module('RoomController')
                             expansion += " ";
                         element[0].value = text.replace(/@?([a-zA-Z0-9_\-:\.]+)$/, expansion);
                         // cancel blink
-                        element[0].className = "";                        
+                        element[0].className = "";     
+                        
+                        // Force angular to wake up and update the input ng-model by firing up input event
+                        angular.element(element[0]).triggerHandler('input');
                     }
                     else {
                         // console.log("wrapped!");
@@ -91,6 +97,9 @@ angular.module('RoomController')
                         }, 150);
                         element[0].value = text;
                         scope.tabCompleteIndex = 0;
+                        
+                        // Force angular to wake up and update the input ng-model by firing up input event
+                        angular.element(element[0]).triggerHandler('input');
                     }
                 }
                 else {