GUACAMOLE-526: Ignore failure to read/write clipboard.

This commit is contained in:
Michael Jumper
2018-04-24 14:42:18 -07:00
parent 9a2e0c6087
commit 670ec390b5
2 changed files with 4 additions and 4 deletions

View File

@@ -447,7 +447,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
// Sync local clipboard as long as the menu is not open // Sync local clipboard as long as the menu is not open
if (!$scope.menu.shown) if (!$scope.menu.shown)
clipboardService.setLocalClipboard(data); clipboardService.setLocalClipboard(data)['catch'](angular.noop);
// Associate new clipboard data with any currently-pressed key // Associate new clipboard data with any currently-pressed key
for (var keysym in keysCurrentlyPressed) for (var keysym in keysCurrentlyPressed)
@@ -576,7 +576,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
// key was pressed (if any) as long as the menu is not open // key was pressed (if any) as long as the menu is not open
var clipboardData = clipboardDataFromKey[keysym]; var clipboardData = clipboardDataFromKey[keysym];
if (clipboardData && !$scope.menu.shown) if (clipboardData && !$scope.menu.shown)
clipboardService.setLocalClipboard(clipboardData); clipboardService.setLocalClipboard(clipboardData)['catch'](angular.noop);
// Deal with substitute key presses // Deal with substitute key presses
if (substituteKeysPressed[keysym]) { if (substituteKeysPressed[keysym]) {
@@ -714,7 +714,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
// Sync with local clipboard // Sync with local clipboard
clipboardService.getLocalClipboard().then(function clipboardRead(data) { clipboardService.getLocalClipboard().then(function clipboardRead(data) {
$scope.$broadcast('guacClipboard', data); $scope.$broadcast('guacClipboard', data);
}); })['catch'](angular.noop);
// Hide status notification // Hide status notification
guacNotification.showStatus(false); guacNotification.showStatus(false);

View File

@@ -137,7 +137,7 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
var checkClipboard = function checkClipboard() { var checkClipboard = function checkClipboard() {
clipboardService.getLocalClipboard().then(function clipboardRead(data) { clipboardService.getLocalClipboard().then(function clipboardRead(data) {
$scope.$broadcast('guacClipboard', data); $scope.$broadcast('guacClipboard', data);
}); })['catch'](angular.noop);
}; };
// Attempt to read the clipboard if it may have changed // Attempt to read the clipboard if it may have changed