From 4a5efe4819cc4cea617eb1866b8c6c6458ba4a5c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 30 Oct 2014 13:24:36 -0700 Subject: [PATCH] GUAC-916: Release ALL keys when browser window loses focus. --- guacamole/src/main/webapp/scripts/client-ui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index 25c3d0db5..78649c582 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -1726,6 +1726,14 @@ GuacUI.Client.attach = function(guac) { }; + /* + * Release all keys if window focus is lost. + */ + + window.onblur = function() { + keyboard.reset(); + }; + /** * Returns the contents of the remote clipboard if clipboard integration is * enabled, and null otherwise. @@ -2132,7 +2140,6 @@ GuacUI.Client.attach = function(guac) { * Update clipboard contents when changed */ - window.onblur = GuacUI.Client.clipboard.onchange = function() { GuacUI.Client.commitClipboard(); };