GUAC-1480: Do not rely on 0x0 clipping - it causes 
window.getSelection().toString() to return nothing. Things need to be at least 
1x1 for selection to work reliably.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/8740d365
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/8740d365
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/8740d365

Branch: refs/heads/master
Commit: 8740d365eb2be96adb6df62237bee8c1aa31640b
Parents: ca20d6a
Author: Michael Jumper <[email protected]>
Authored: Wed Feb 3 16:54:25 2016 -0800
Committer: Michael Jumper <[email protected]>
Committed: Wed Feb 3 16:54:25 2016 -0800

----------------------------------------------------------------------
 .../src/main/webapp/app/client/services/clipboardService.js    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/8740d365/guacamole/src/main/webapp/app/client/services/clipboardService.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/services/clipboardService.js 
b/guacamole/src/main/webapp/app/client/services/clipboardService.js
index 8013771..c0ff6f7 100644
--- a/guacamole/src/main/webapp/app/client/services/clipboardService.js
+++ b/guacamole/src/main/webapp/app/client/services/clipboardService.js
@@ -57,8 +57,10 @@ angular.module('client').factory('clipboardService', 
['$injector',
 
     clipElement.appendChild(clipboardContent);
     clipElement.style.position = 'absolute';
-    clipElement.style.width = '0px';
-    clipElement.style.height = '0px';
+    clipElement.style.width = '1px';
+    clipElement.style.height = '1px';
+    clipElement.style.left = '-1px';
+    clipElement.style.top = '-1px';
     clipElement.style.overflow = 'hidden';
 
     document.body.appendChild(clipElement);

Reply via email to