GUACAMOLE-55: Prevent clipboard events generated by the clipboardService from disturbing the operations of the guacClipboard directive.

This commit is contained in:
Michael Jumper
2016-06-28 14:00:53 -07:00
parent ea5ee1825b
commit 16637b0732
2 changed files with 19 additions and 3 deletions

View File

@@ -288,9 +288,9 @@ angular.module('clipboard').directive('guacClipboard', ['$injector',
};
// Attempt to read the clipboard if it may have changed
$window.addEventListener('copy', checkClipboard, true);
$window.addEventListener('cut', checkClipboard, true);
$window.addEventListener('focus', checkClipboard, true);
$window.addEventListener('copy', checkClipboard);
$window.addEventListener('cut', checkClipboard);
$window.addEventListener('focus', checkClipboard);
// Clean up on destruction
$scope.$on('$destroy', function destroyClipboard() {