mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-352: Refocus InputSink through key events rather than clicks.
This commit is contained in:
@@ -1398,7 +1398,7 @@ Guacamole.Keyboard.InputSink = function InputSink() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Automatically refocus input sink if part of DOM
|
// 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
|
// Do not refocus if focus is on an input field
|
||||||
var focused = document.activeElement;
|
var focused = document.activeElement;
|
||||||
@@ -1407,7 +1407,6 @@ Guacamole.Keyboard.InputSink = function InputSink() {
|
|||||||
|
|
||||||
// Refocus input sink instead of handling click
|
// Refocus input sink instead of handling click
|
||||||
sink.focus();
|
sink.focus();
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user