Skip to content

Commit

Permalink
fix: do not propagate events handled by keyboard bindings
Browse files Browse the repository at this point in the history
Closes #3016
  • Loading branch information
philippfromme committed Aug 18, 2022
1 parent 6c75db0 commit 3ce535d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,27 @@ export default class PropertiesPanelKeyboardBindings {
if (isUndo(event)) {
commandStack.canUndo() && commandStack.undo();

event.preventDefault();
this._cancel(event);
}

if (isRedo(event)) {
commandStack.canRedo() && commandStack.redo();

event.preventDefault();
this._cancel(event);
}
}

_getContainer() {
return this._propertiesPanel._container;
}

/**
* @param {KeyboardEvent} event
*/
_cancel(event) {
event.preventDefault();
event.stopPropagation();
}
}

PropertiesPanelKeyboardBindings.$inject = [ 'commandStack', 'eventBus', 'propertiesPanel' ];
Expand Down

0 comments on commit 3ce535d

Please sign in to comment.