From ef0939db0681c920eb2dcbca107ddae1787a6732 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 16 May 2014 13:54:02 -0700 Subject: [PATCH] GUAC-692: Use new padding constants when calculating backspace/delete in text input mode. --- guacamole/src/main/webapp/scripts/client-ui.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index 9bd9d468d..d30038965 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -2121,17 +2121,18 @@ GuacUI.Client.attach = function(guac) { var i; var content = GuacUI.Client.text_input.target.value; + var expected_length = GuacUI.Client.TEXT_INPUT_PADDING*2; // If content removed, update - if (content.length < 256) { + if (content.length < expected_length) { // Calculate number of backspaces and send - var backspace_count = 128 - GuacUI.Client.text_input.target.selectionStart; + var backspace_count = GuacUI.Client.TEXT_INPUT_PADDING - GuacUI.Client.text_input.target.selectionStart; for (i=0; i