From a53c189e4b379a262bc424be263c19290be18e6d Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 20 May 2014 09:26:44 +0200 Subject: Morphic: Prevent default action for ctrl-/cmd-key events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and allow using these for Snap! without having Chrome trigger its own actions for them --- history.txt | 4 ++++ morphic.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 diff --git a/morphic.js b/morphic.js index b55b180..48e29bb 100644 --- a/morphic.js +++ b/morphic.js @@ -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 ); -- cgit v1.3.1