GUAC-1480: Fix broken menu clipboard regression.

This commit is contained in:
James Muehlner
2016-02-08 21:39:58 -08:00
parent 1564aeed87
commit a492e2a8f3
2 changed files with 9 additions and 6 deletions

View File

@@ -379,6 +379,11 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
});
// Update remote clipboard if local clipboard changes
$scope.$on('guacClipboard', function onClipboard(event, mimetype, data) {
$scope.client.clipboardData = data;
});
$scope.$on('guacKeydown', function keydownListener(event, keysym, keyboard) {
keysCurrentlyPressed[keysym] = true;

View File

@@ -413,11 +413,9 @@ angular.module('client').directive('guacClient', [function guacClient() {
};
// Update remote clipboard if local clipboard changes
$scope.$on('guacClipboard', function onClipboard(event, mimetype, data) {
if (client && data !== $scope.client.clipboardData) {
$scope.$watch('client.clipboardData', function clipboardChanged(data) {
if (client)
client.setClipboard(data);
$scope.client.clipboardData = data;
}
});
// Translate local keydown events to remote keydown events if keyboard is enabled