From ed18ac54c5f38c471ab660cf97eeed6908056abf Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Fri, 13 Oct 2017 11:44:34 +0200 Subject: [PATCH] Update sumorobot.js --- sumorobot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sumorobot.js b/sumorobot.js index 0745b59..c23f29e 100755 --- a/sumorobot.js +++ b/sumorobot.js @@ -293,7 +293,7 @@ window.onload = function() { /* key down event */ $(document).keydown(function(e) { /* if the hotkeys are disabled or the focused element is a textarea or text input, don't use hotkeys */ - if (hotkeys == false || $(e.target).is("textarea") || $(e.target).is("[type=text]")) return; + if (hotkeys == false || $(e.target).is("textarea") || $(e.target).is("[type=text]") || $(e.target).is("[class=blocklyHtmlInput]")) return; /* select the hotkey */ switch(e.which) { case 32: // space bar @@ -354,7 +354,7 @@ window.onload = function() { /* key up event */ $(document).keyup(function(e) { /* if the hotkeys are disabled or the focused element is a textarea or text input, don't use hotkeys */ - if (hotkeys == false || $(e.target).is("textarea") || $(e.target).is("[type=text]")) return; + if (hotkeys == false || $(e.target).is("textarea") || $(e.target).is("[type=text]") || $(e.target).is("[class=blocklyHtmlInput]")) return; /* remove hover from buttons */ $('.btn').removeClass('hover'); /* if arrow keys */