Repository: guacamole-client Updated Branches: refs/heads/master bd73f9ca7 -> 073dbe724
GUACAMOLE-352: Refocus InputSink through key events rather than clicks. Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/05822907 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/05822907 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/05822907 Branch: refs/heads/master Commit: 05822907b46528ac91c8405c1da2f38602309572 Parents: f696860 Author: Michael Jumper <mjum...@apache.org> Authored: Mon Dec 18 10:40:59 2017 -0800 Committer: Michael Jumper <mjum...@apache.org> Committed: Tue Jan 16 09:50:54 2018 -0800 ---------------------------------------------------------------------- guacamole-common-js/src/main/webapp/modules/Keyboard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/05822907/guacamole-common-js/src/main/webapp/modules/Keyboard.js ---------------------------------------------------------------------- diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js b/guacamole-common-js/src/main/webapp/modules/Keyboard.js index ea7128b..3cc28f8 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);