From 299eb56d79f92282c362733948cefc6e5fc99097 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 17 Feb 2011 02:05:36 -0800 Subject: [PATCH 1/2] Adding a layer should not remove ALL contents of display (the on-screen keyboard, for example, is a child of the display) --- .../src/main/resources/guacamole.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/guacamole-common-js/src/main/resources/guacamole.js b/guacamole-common-js/src/main/resources/guacamole.js index 4208eb4fc..d24f5a02b 100644 --- a/guacamole-common-js/src/main/resources/guacamole.js +++ b/guacamole-common-js/src/main/resources/guacamole.js @@ -476,18 +476,25 @@ function GuacamoleClient(display, tunnelURL) { layer = new Layer(displayWidth, displayHeight); layers[index] = layer; - // Remove all children - display.innerHTML = ""; - - // Add existing layers in order + // (Re)-add existing layers in order for (var i=0; i Date: Thu, 17 Feb 2011 02:27:49 -0800 Subject: [PATCH 2/2] removeChild(), not removeNode() --- guacamole-common-js/src/main/resources/guacamole.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/resources/guacamole.js b/guacamole-common-js/src/main/resources/guacamole.js index d24f5a02b..7cfec8417 100644 --- a/guacamole-common-js/src/main/resources/guacamole.js +++ b/guacamole-common-js/src/main/resources/guacamole.js @@ -482,7 +482,7 @@ function GuacamoleClient(display, tunnelURL) { // If already present, remove if (layers[i].parentNode === display) - display.removeNode(layers[i]); + display.removeChild(layers[i]); // Add to end display.appendChild(layers[i]); @@ -492,7 +492,7 @@ function GuacamoleClient(display, tunnelURL) { // Add cursor layer last if (cursor != null) { if (cursor.parentNode === display) - display.removeNode(cursor); + display.removeChild(cursor); display.appendChild(cursor); }