From 7b660b1de9fe2db99a2ea8565fa0321a5f3a2a93 Mon Sep 17 00:00:00 2001 From: Maharshi Patel Date: Thu, 22 Aug 2024 15:35:08 +0530 Subject: [PATCH] fix: update key bindings logic as per new Structure After Multi page refactor, key bindings logic was not working as expected. There was a check which would return if target was not document.body but that was incorrect as we changed Structure of canvas area. --- .../public/js/print_designer/composables/AttachKeyBindings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print_designer/public/js/print_designer/composables/AttachKeyBindings.js b/print_designer/public/js/print_designer/composables/AttachKeyBindings.js index 105c88e..d7edc2f 100644 --- a/print_designer/public/js/print_designer/composables/AttachKeyBindings.js +++ b/print_designer/public/js/print_designer/composables/AttachKeyBindings.js @@ -45,7 +45,7 @@ export function useAttachKeyBindings() { const handleKeyDown = async (e) => { MainStore.isAltKey = e.altKey; MainStore.isShiftKey = e.shiftKey; - if (e.target !== document.body || MainStore.openModal) return; + if (!e.target.classList.contains("print-format-container") || MainStore.openModal) return; if (e.ctrlKey || e.metaKey) { if (["a", "A"].indexOf(e.key) != -1) { ElementStore.Elements.forEach((page) => {