diff --git a/src/com/actelion/research/gwt/gui/editor/DrawArea.java b/src/com/actelion/research/gwt/gui/editor/DrawArea.java index b2d20992..540845dd 100644 --- a/src/com/actelion/research/gwt/gui/editor/DrawArea.java +++ b/src/com/actelion/research/gwt/gui/editor/DrawArea.java @@ -307,10 +307,12 @@ public void onKeyDown(KeyDownEvent event) { meta = event.isMetaKeyDown() || event.isControlKeyDown(); code = event.getNativeKeyCode(); if (!meta && isValidKey(code)) { + event.stopPropagation(); event.preventDefault(); } else if (meta) { if (code == KeyCodes.KEY_C) { copyMolecule(); + event.stopPropagation(); event.preventDefault(); } } @@ -321,6 +323,7 @@ public void onKeyDown(KeyDownEvent event) { public void onKeyUp(KeyUpEvent event) { code = event.getNativeKeyCode(); if (!meta && isValidKey(code)) { + event.stopPropagation(); event.preventDefault(); handler.onKey(new ACTKeyEvent(code, event, // .isShiftKeyDown(), pressed ? (ACTKeyEvent.LETTER | ACTKeyEvent.DIGIT) : 0)); @@ -335,6 +338,7 @@ public void onKeyPress(KeyPressEvent event) { pressed = true; code = event.getCharCode(); if (isValidKey(code)) { + event.stopPropagation(); event.preventDefault(); } }