From 22d9f7a1991043f16e082395fab82154b4cea47f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 27 Sep 2012 20:53:32 -0300 Subject: [PATCH] - Do not propagate some keyboard events. --- mindplot/src/main/javascript/DesignerKeyboard.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mindplot/src/main/javascript/DesignerKeyboard.js b/mindplot/src/main/javascript/DesignerKeyboard.js index 1bab4e69..f3aebdd5 100644 --- a/mindplot/src/main/javascript/DesignerKeyboard.js +++ b/mindplot/src/main/javascript/DesignerKeyboard.js @@ -60,20 +60,29 @@ mindplot.DesignerKeyboard = new Class({ } }.bind(this), - 'delete':function () { + 'delete':function (event) { designer.deleteSelectedEntities(); + + event.preventDefault(); + event.stopPropagation(); }.bind(this), 'enter':function () { designer.createSiblingForSelectedNode(); }.bind(this), - 'insert':function () { + 'insert':function (event) { designer.createChildForSelectedNode(); + + event.preventDefault(); + event.stopPropagation(); }.bind(this), - 'tab':function () { + 'tab':function (event) { designer.createChildForSelectedNode(); + + event.preventDefault(); + event.stopPropagation(); }.bind(this), '-':function () { // "-" is a insert on several Browsers. Don't ask why ...