From 05822907b46528ac91c8405c1da2f38602309572 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 18 Dec 2017 10:40:59 -0800 Subject: [PATCH] GUACAMOLE-352: Refocus InputSink through key events rather than clicks. --- guacamole-common-js/src/main/webapp/modules/Keyboard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js b/guacamole-common-js/src/main/webapp/modules/Keyboard.js index ea7128bfa..3cc28f84d 100644 --- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js +++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js @@ -1398,7 +1398,7 @@ Guacamole.Keyboard.InputSink = function InputSink() { }; // Automatically refocus input sink if part of DOM - document.addEventListener("click", function refocusSink(e) { + document.addEventListener("keydown", function refocusSink(e) { // Do not refocus if focus is on an input field var focused = document.activeElement; @@ -1407,7 +1407,6 @@ Guacamole.Keyboard.InputSink = function InputSink() { // Refocus input sink instead of handling click sink.focus(); - e.preventDefault(); }, true);