jmuehlner commented on code in PR #796:
URL: https://github.com/apache/guacamole-client/pull/796#discussion_r1117480336
##########
guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js:
##########
@@ -92,17 +141,23 @@ angular.module('clipboard').directive('guacClipboard',
['$injector',
// that indicate the clipboard field may have been changed
element.addEventListener('input', updateClipboardData);
element.addEventListener('change', updateClipboardData);
+ element.addEventListener('focus', displayAndUpdateClipboardEditor);
+ element.addEventListener('blur', hideAndUpdateClipboardEditor);
// Update remote clipboard if local clipboard changes
$scope.$on('guacClipboard', function clipboardChanged(event, data) {
- updateClipboardEditor(data);
- });
+ // Don't update with clipboard data unless focused.
+ if (!isActive) {
+ return
+ }
- // Init clipboard editor with current clipboard contents
- clipboardService.getClipboard().then((data) => {
updateClipboardEditor(data);
- }, angular.noop);
Review Comment:
Why d
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]