We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7068c56 commit ca83b21Copy full SHA for ca83b21
webSource/js/Globals.js
@@ -69,12 +69,23 @@ var AJAX = new function() {
69
*/
70
this.createTerminal = function (authKey, namespace) {
71
72
- console.log(namespace);
+ var term;
73
74
- return new Terminal({
+ term = new Terminal({
75
container: document.body,
76
authKey: authKey || null,
77
defaultNamespace: namespace
78
});
79
80
+ // fix for not active input on terminal window (fix placed here, because whole terminal app
81
+ // can be embedded into another app and input focus can cause by-effect)
82
+ window.addEventListener("keydown", function (e) {
83
+ if (!e.ctrlKey && !e.shiftKey && !e.altKey
84
+ && term.elements.input !== document.activeElement) {
85
+ term.input.focus();
86
+ }
87
+ });
88
+
89
+ return term;
90
91
};
0 commit comments