GUAC-1480: Clean up and document init.

This commit is contained in:
Michael Jumper
2016-02-05 10:47:30 -08:00
parent 3869ca25c9
commit 944d126c42

View File

@@ -55,6 +55,7 @@ angular.module('client').factory('clipboardService', ['$injector',
*/ */
var lastClipboardEvent = ''; var lastClipboardEvent = '';
// Ensure textarea is selectable but not visible
clipElement.appendChild(clipboardContent); clipElement.appendChild(clipboardContent);
clipElement.style.position = 'absolute'; clipElement.style.position = 'absolute';
clipElement.style.width = '1px'; clipElement.style.width = '1px';
@@ -63,6 +64,7 @@ angular.module('client').factory('clipboardService', ['$injector',
clipElement.style.top = '-1px'; clipElement.style.top = '-1px';
clipElement.style.overflow = 'hidden'; clipElement.style.overflow = 'hidden';
// Add textarea to DOM
document.body.appendChild(clipElement); document.body.appendChild(clipElement);
/** /**