mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
fix(client): delete shortcut key not working
This commit is contained in:
@@ -148,13 +148,19 @@ describe("shortcuts", () => {
|
||||
expect(matchesShortcut(event, "a")).toBe(false);
|
||||
});
|
||||
|
||||
it("should match function keys even with no modifiers", () => {
|
||||
it("should match some keys even with no modifiers", () => {
|
||||
// Bare function keys
|
||||
let event = createKeyboardEvent({ key: "F1", code: "F1" });
|
||||
expect(matchesShortcut(event, "F1")).toBeTruthy();
|
||||
expect(matchesShortcut(event, "f1")).toBeTruthy();
|
||||
|
||||
// Function keys with shift
|
||||
event = createKeyboardEvent({ key: "F1", code: "F1", shiftKey: true });
|
||||
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
|
||||
|
||||
// Delete
|
||||
event = createKeyboardEvent({ key: "Delete", code: "Delete" });
|
||||
expect(matchesShortcut(event, "Delete")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should handle alternative modifier names", () => {
|
||||
|
||||
Reference in New Issue
Block a user