Skip to content

Commit

Permalink
feat: close slash menu on escape
Browse files Browse the repository at this point in the history
  • Loading branch information
m-risto committed Sep 17, 2024
1 parent 28314a5 commit e73afff
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export class BnaSuggestionsMenuComponent implements OnInit, OnDestroy {
event.preventDefault();
this.insertSelectedBlock();
return;
} else if (event.key === 'Escape') {
event.preventDefault();
this.ngxBlockNoteService.editor().suggestionMenus.closeMenu();
return;
}
}
selectedIndex = 0;
Expand Down

0 comments on commit e73afff

Please sign in to comment.