mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-352: Handle input/composition events while bubbling.
This commit is contained in:
@@ -1293,7 +1293,7 @@ Guacamole.Keyboard = function Keyboard(element) {
|
||||
|
||||
// Type all content written
|
||||
if (e.data && !e.isComposing) {
|
||||
element.removeEventListener("compositionend", handleComposition, true);
|
||||
element.removeEventListener("compositionend", handleComposition, false);
|
||||
guac_keyboard.type(e.data);
|
||||
}
|
||||
|
||||
@@ -1319,15 +1319,15 @@ Guacamole.Keyboard = function Keyboard(element) {
|
||||
|
||||
// Type all content written
|
||||
if (e.data) {
|
||||
element.removeEventListener("input", handleInput, true);
|
||||
element.removeEventListener("input", handleInput, false);
|
||||
guac_keyboard.type(e.data);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Automatically type text entered into the wrapped field
|
||||
element.addEventListener("input", handleInput, true);
|
||||
element.addEventListener("compositionend", handleComposition, true);
|
||||
element.addEventListener("input", handleInput, false);
|
||||
element.addEventListener("compositionend", handleComposition, false);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user