mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Do not handle keypress if we already handled the event in keydown.
This commit is contained in:
@@ -357,6 +357,7 @@ Guacamole.Keyboard = function(element) {
|
||||
}
|
||||
|
||||
|
||||
var expect_keypress = true;
|
||||
var keydown_code = null;
|
||||
|
||||
var deferred_keypress = null;
|
||||
@@ -432,7 +433,7 @@ Guacamole.Keyboard = function(element) {
|
||||
return;
|
||||
}
|
||||
|
||||
var expect_keypress = true;
|
||||
expect_keypress = true;
|
||||
|
||||
// Ctrl/Alt/Shift
|
||||
if (keynum == 16) guac_keyboard.modifiers.shift = true;
|
||||
@@ -490,6 +491,10 @@ Guacamole.Keyboard = function(element) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
// Do not handle if we weren't expecting this event (will have already
|
||||
// been handled by keydown)
|
||||
if (!expect_keypress) return;
|
||||
|
||||
var keynum;
|
||||
if (window.event) keynum = window.event.keyCode;
|
||||
else if (e.which) keynum = e.which;
|
||||
|
Reference in New Issue
Block a user