diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index c43df637..5dba0316 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -197,7 +197,7 @@ mindplot.Designer = new Class({ var objects = model.getObjects(); objects.forEach(function(object) { // Disable all nodes on focus but not the current if Ctrl key isn't being pressed - if (!$defined(event) || (!event.ctrlKey && !event.metaKey)) { + if (!$defined(event) || (!event.control && !event.meta)) { if (object.isOnFocus() && object != currentObject) { object.setOnFocus(false); } diff --git a/mindplot/src/main/javascript/Topic.js b/mindplot/src/main/javascript/Topic.js index 3d02f3ad..f7a01417 100644 --- a/mindplot/src/main/javascript/Topic.js +++ b/mindplot/src/main/javascript/Topic.js @@ -693,7 +693,7 @@ mindplot.Topic = new Class({ // Focus events ... var mouseDown = function(event) { var value = true; - if ((event.metaKey && Browser.Platform.mac) || (event.ctrlKey && !Browser.Platform.mac)) { + if ((event.meta && Browser.Platform.mac) || (event.control && !Browser.Platform.mac)) { value = !this.isOnFocus(); event.stopPropagation(); event.preventDefault(); diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 6ae6f316..ea18ddcd 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -246,7 +246,7 @@ mindplot.widget.Menu = new Class({ if (saveElem) { this.addButton('save', false, false, function() { this._save(saveElem, designer, true); - }); + }.bind(this)); if (!readOnly) { // To prevent the user from leaving the page with changes ...