From 1349017c8a2fefb9a85559bf1a39c473f59055f1 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Wed, 10 Jun 2020 10:28:02 -0700 Subject: [PATCH] Check if a gesture is in progress before doing keyboard nav (#3950) * Check if a gesture is in progress before doing keyboard nav --- core/blockly.js | 2 +- core/keyboard_nav/navigation.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/blockly.js b/core/blockly.js index 62bedf785..c036c2b68 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -189,7 +189,7 @@ Blockly.onKeyDown = function(e) { // Pressing esc closes the context menu. Blockly.hideChaff(); Blockly.navigation.onBlocklyAction(Blockly.navigation.ACTION_EXIT); - } else if (Blockly.navigation.onKeyPress(e)) { + } else if (!Blockly.Gesture.inProgress() && Blockly.navigation.onKeyPress(e)) { // If the keyboard or field handled the key press return. return; } else if (e.keyCode == Blockly.utils.KeyCodes.BACKSPACE || diff --git a/core/keyboard_nav/navigation.js b/core/keyboard_nav/navigation.js index d342a125c..914882592 100644 --- a/core/keyboard_nav/navigation.js +++ b/core/keyboard_nav/navigation.js @@ -18,7 +18,6 @@ goog.require('Blockly.ASTNode'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.user.keyMap'); - /** * A function to call to give feedback to the user about logs, warnings, and * errors. You can override this to customize feedback (e.g. warning sounds,