forked from marva/sumorobot-web
Update sumorobot.js
This commit is contained in:
parent
23af7025f0
commit
ed18ac54c5
@ -293,7 +293,7 @@ window.onload = function() {
|
|||||||
/* key down event */
|
/* key down event */
|
||||||
$(document).keydown(function(e) {
|
$(document).keydown(function(e) {
|
||||||
/* if the hotkeys are disabled or the focused element is a textarea or text input, don't use hotkeys */
|
/* 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 */
|
/* select the hotkey */
|
||||||
switch(e.which) {
|
switch(e.which) {
|
||||||
case 32: // space bar
|
case 32: // space bar
|
||||||
@ -354,7 +354,7 @@ window.onload = function() {
|
|||||||
/* key up event */
|
/* key up event */
|
||||||
$(document).keyup(function(e) {
|
$(document).keyup(function(e) {
|
||||||
/* if the hotkeys are disabled or the focused element is a textarea or text input, don't use hotkeys */
|
/* 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 */
|
/* remove hover from buttons */
|
||||||
$('.btn').removeClass('hover');
|
$('.btn').removeClass('hover');
|
||||||
/* if arrow keys */
|
/* if arrow keys */
|
||||||
|
Loading…
Reference in New Issue
Block a user