From a9fd6ac1146a7068953f44a58305b9015239c1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 27 Sep 2022 20:28:43 +0200 Subject: [PATCH] guac remove text compositon. --- client/src/utils/guacamole-keyboard.js | 55 +------------------------- 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/client/src/utils/guacamole-keyboard.js b/client/src/utils/guacamole-keyboard.js index e42fbde..df0b93c 100644 --- a/client/src/utils/guacamole-keyboard.js +++ b/client/src/utils/guacamole-keyboard.js @@ -1365,60 +1365,7 @@ Guacamole.Keyboard = function Keyboard(element) { }, true); - /** - * Handles the given "input" event, typing the data within the input text. - * If the event is complete (text is provided), handling of "compositionend" - * events is suspended, as such events may conflict with input events. - * - * @private - * @param {!InputEvent} e - * The "input" event to handle. - */ - var handleInput = function handleInput(e) { - - // Only intercept if handler set - if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return; - - // Ignore events which have already been handled - if (!markEvent(e)) return; - - // Type all content written - if (e.data && !e.isComposing) { - element.removeEventListener("compositionend", handleComposition, false); - guac_keyboard.type(e.data); - } - - }; - - /** - * Handles the given "compositionend" event, typing the data within the - * composed text. If the event is complete (composed text is provided), - * handling of "input" events is suspended, as such events may conflict - * with composition events. - * - * @private - * @param {!CompositionEvent} e - * The "compositionend" event to handle. - */ - var handleComposition = function handleComposition(e) { - - // Only intercept if handler set - if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return; - - // Ignore events which have already been handled - if (!markEvent(e)) return; - - // Type all content written - if (e.data) { - element.removeEventListener("input", handleInput, false); - guac_keyboard.type(e.data); - } - - }; - - // Automatically type text entered into the wrapped field - element.addEventListener("input", handleInput, false); - element.addEventListener("compositionend", handleComposition, false); + // NEKO: Do not automatically type text entered into the wrapped field };