Merge pull request #330 from glyptodon/fix-clipboard-reset

GUAC-1480: Fix handling of clipboard changes.
This commit is contained in:
James Muehlner
2016-02-09 14:18:13 -08:00
2 changed files with 4 additions and 7 deletions

View File

@@ -379,11 +379,6 @@ 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) { $scope.$on('guacKeydown', function keydownListener(event, keysym, keyboard) {
keysCurrentlyPressed[keysym] = true; keysCurrentlyPressed[keysym] = true;

View File

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