You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2016/03/20 03:21:52 UTC

[12/50] incubator-guacamole-client git commit: 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.

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 <mi...@guac-dev.org>
Authored: Wed Feb 3 16:54:25 2016 -0800
Committer: Michael Jumper <mi...@guac-dev.org>
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);