GUAC-1480: Consume 'guacClipboard' events ONLY in guacClient directive. Use 'guacClipboard' events as the sole source of clipboard data - do not scope watch.

This commit is contained in:
Michael Jumper
2016-02-09 14:05:48 -08:00
parent 948ccffd82
commit 443e93a3c2
2 changed files with 4 additions and 7 deletions

View File

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