fix mainInput retaining focus between sending consecutive messages by disabling commit 955662d6

paul/schema_breaking_changes
Matthew Hodgson 2014-08-22 01:54:37 +01:00
parent 868fa1a1e3
commit 3248aed03b
2 changed files with 4 additions and 4 deletions

View File

@ -33,6 +33,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
can_paginate: true, // this is toggled off when we run out of items can_paginate: true, // this is toggled off when we run out of items
paginating: false, // used to avoid concurrent pagination requests pulling in dup contents paginating: false, // used to avoid concurrent pagination requests pulling in dup contents
stream_failure: undefined, // the response when the stream fails stream_failure: undefined, // the response when the stream fails
// FIXME: sending has been disabled, as surely messages should be sent in the background rather than locking the UI synchronously --Matthew
sending: false // true when a message is being sent. It helps to disable the UI when a process is running sending: false // true when a message is being sent. It helps to disable the UI when a process is running
}; };
$scope.members = {}; $scope.members = {};
@ -263,7 +264,6 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
}; };
$scope.onInit = function() { $scope.onInit = function() {
// $timeout(function() { document.getElementById('textInput').focus() }, 0);
console.log("onInit"); console.log("onInit");
// Does the room ID provided in the URL? // Does the room ID provided in the URL?

View File

@ -77,10 +77,10 @@
{{ state.user_id }} {{ state.user_id }}
</td> </td>
<td width="*" style="min-width: 100px"> <td width="*" style="min-width: 100px">
<input id="mainInput" ng-model="textInput" ng-enter="send()" ng-disabled="state.sending" ng-focus="true" autocomplete="off" tab-complete/> <input id="mainInput" ng-model="textInput" ng-enter="send()" ng-focus="true" autocomplete="off" tab-complete/>
</td> </td>
<td width="150px"> <td width="150px">
<button ng-click="send()" ng-disabled="state.sending">Send</button> <button ng-click="send()">Send</button>
<button m-file-input="imageFileToSend">Send Image</button> <button m-file-input="imageFileToSend">Send Image</button>
</td> </td>
<td width="1"> <td width="1">