Morphic: Prevent default action for ctrl-/cmd-key events

… and allow using these for Snap! without having Chrome trigger its own
actions for them
pull/3/merge
jmoenig 2014-05-20 09:26:44 +02:00
rodzic f9989ad7cf
commit a53c189e4b
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -2125,3 +2125,7 @@ ______
------
* error message when trying to import a non-text file into a variable, thanks, Nate!
* fixed #407 (custom-block coloring w/ zebra off)
140520
------
* Morphic: Prevent default action for ctrl-/cmd-key events

Wyświetl plik

@ -1035,7 +1035,7 @@
/*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio,
FileList, getBlurredShadowSupport*/
var morphicVersion = '2014-February-03';
var morphicVersion = '2014-April-20';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
@ -10268,6 +10268,9 @@ WorldMorph.prototype.initEventListeners = function () {
}
event.preventDefault();
}
if (event.ctrlKey || event.metaKey) {
event.preventDefault();
}
},
false
);