From 944d126c422c9b460099fef7bc70908e265c52c4 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 5 Feb 2016 10:47:30 -0800 Subject: [PATCH] GUAC-1480: Clean up and document init. --- .../webapp/app/client/services/clipboardService.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/services/clipboardService.js b/guacamole/src/main/webapp/app/client/services/clipboardService.js index c760120da..71f3ec2c8 100644 --- a/guacamole/src/main/webapp/app/client/services/clipboardService.js +++ b/guacamole/src/main/webapp/app/client/services/clipboardService.js @@ -55,14 +55,16 @@ angular.module('client').factory('clipboardService', ['$injector', */ var lastClipboardEvent = ''; + // Ensure textarea is selectable but not visible clipElement.appendChild(clipboardContent); clipElement.style.position = 'absolute'; - clipElement.style.width = '1px'; - clipElement.style.height = '1px'; - clipElement.style.left = '-1px'; - clipElement.style.top = '-1px'; + clipElement.style.width = '1px'; + clipElement.style.height = '1px'; + clipElement.style.left = '-1px'; + clipElement.style.top = '-1px'; clipElement.style.overflow = 'hidden'; + // Add textarea to DOM document.body.appendChild(clipElement); /**