From a7cf3b70c908b39acb6c8d77d306d86f71a6f625 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Sun, 14 May 2017 12:34:47 -0400 Subject: [PATCH] fix regression with OSX keyboard shortcuts by only filtering arrow keys and spacebar in editmode. Previously all default actions were filtered, and this broke OSX keyboard shortcuts. --- pd/nw/pd_canvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js index cf1cd6805..ad1bf2fc8 100644 --- a/pd/nw/pd_canvas.js +++ b/pd/nw/pd_canvas.js @@ -308,7 +308,9 @@ var canvas_events = (function() { // on arrow keys in editmode if (document.querySelector("#patchsvg") .classList.contains("editmode")) { - evt.preventDefault(); + if ([32, 37, 38, 39, 40].indexOf(evt.keyCode) > -1) { + evt.preventDefault(); + } } }, keypress: function(evt) { -- GitLab