diff options
| author | jmoenig <jens@moenig.org> | 2014-05-20 09:26:44 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-05-20 09:26:44 +0200 |
| commit | a53c189e4b379a262bc424be263c19290be18e6d (patch) | |
| tree | 6ddec3bdb31354a0da9447d6bd256ee639da8a72 | |
| parent | f9989ad7cfa5e27b4784d8cd464fdc7cbe289942 (diff) | |
| download | snap-yow-a53c189e4b379a262bc424be263c19290be18e6d.tar.gz snap-yow-a53c189e4b379a262bc424be263c19290be18e6d.zip | |
Morphic: Prevent default action for ctrl-/cmd-key events
… and allow using these for Snap! without having Chrome trigger its own
actions for them
| -rwxr-xr-x | history.txt | 4 | ||||
| -rw-r--r-- | morphic.js | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/history.txt b/history.txt index af54766..faf992d 100755 --- a/history.txt +++ b/history.txt @@ -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 @@ -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 ); |
