Skip to content

Commit

Permalink
fix: remove keyboard shortcut for permanently deleting a note
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Oct 16, 2020
1 parent ceb2b3a commit c26d6a7
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions app/assets/javascripts/views/editor/editor_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> {

private removeAltKeyObserver?: any
private removeTrashKeyObserver?: any
private removeDeleteKeyObserver?: any
private removeTabObserver?: any

private removeTagsObserver!: () => void
Expand Down Expand Up @@ -155,8 +154,6 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> {
this.removeAltKeyObserver = undefined;
this.removeTrashKeyObserver();
this.removeTrashKeyObserver = undefined;
this.removeDeleteKeyObserver();
this.removeDeleteKeyObserver = undefined;
this.removeTabObserver && this.removeTabObserver();
this.removeTabObserver = undefined;
this.leftPanelPuppet = undefined;
Expand Down Expand Up @@ -1162,19 +1159,6 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> {
this.deleteNote(false);
},
});

this.removeDeleteKeyObserver = this.application.getKeyboardService().addKeyObserver({
key: KeyboardKey.Backspace,
modifiers: [
KeyboardModifier.Meta,
KeyboardModifier.Shift,
KeyboardModifier.Alt
],
onKeyDown: (event) => {
event.preventDefault();
this.deleteNote(true);
},
});
}

onSystemEditorLoad() {
Expand Down

0 comments on commit c26d6a7

Please sign in to comment.