summary refs log tree commit diff
path: root/webclient/room/room.html
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-23 16:53:27 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-23 16:56:54 +0100
commita7420ff2b5b2880bded6d13b548607028113397f (patch)
treeea087718a08e7d8a7f6a49f6ca1267583a63d1c6 /webclient/room/room.html
parentSYWEB-28: Fixed weird members list ordering: sort members on their last activ... (diff)
downloadsynapse-a7420ff2b5b2880bded6d13b548607028113397f.tar.xz
Fix SYWEB-72 : Improve performance when typing.
Swapped ng-keydown to a directive, which does the same thing (check if up/down
arrow then call history.goUp/goDown). This has *dramatically* improved
performance when typing in rooms which have lots (>100) of messages loaded.
Diffstat (limited to '')
-rw-r--r--webclient/room/room.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index c807e2afe1..2786246232 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -163,8 +163,7 @@
                     <td width="*">
                         <textarea id="mainInput" rows="1" ng-enter="send()"
                                   ng-disabled="state.permission_denied"
-                                  ng-keydown="(38 === $event.which) ? history.goUp($event) : ((40 === $event.which) ? history.goDown($event) : 0)"
-                                  ng-focus="true" autocomplete="off" tab-complete/>
+                                  ng-focus="true" autocomplete="off" tab-complete command-history/>
                     </td>
                     <td id="buttonsCell">
                         <button ng-click="send()" ng-disabled="state.permission_denied">Send</button>