From 8f7d1833f6e6b304e706bb84848dbf86a80834c8 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 13 Aug 2014 18:06:57 +0200 Subject: [PATCH] Fix #563 (Paste into Chrome), thanks, @Muon, for the hint! --- history.txt | 1 + morphic.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/history.txt b/history.txt index 7d609717..d18452e3 100755 --- a/history.txt +++ b/history.txt @@ -2261,3 +2261,4 @@ ______ 140813 ------ * Threads, Blocks: enable Zombiefication of JS-Functions +* Morphic: Fix #563 (Paste into Chrome), thanks, @Muon, for the hint! diff --git a/morphic.js b/morphic.js index 2bbdd4ea..2a242f25 100644 --- a/morphic.js +++ b/morphic.js @@ -1035,7 +1035,7 @@ /*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio, FileList, getBlurredShadowSupport*/ -var morphicVersion = '2014-July-29'; +var morphicVersion = '2014-August-13'; var modules = {}; // keep track of additional loaded modules var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug @@ -10321,7 +10321,8 @@ WorldMorph.prototype.initEventListeners = function () { } event.preventDefault(); } - if (event.ctrlKey || event.metaKey) { + if ((event.ctrlKey || event.metaKey) && + (event.keyIdentifier !== 'U+0056')) { // allow pasting-in event.preventDefault(); } },