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(); };