Skip to content

Commit

Permalink
fix(minor): revert keybinding changes (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
maharshivpatel authored Sep 19, 2024
2 parents 4f6e6c6 + 4438560 commit 7d82add
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ export function useAttachKeyBindings() {
const handleKeyDown = async (e) => {
MainStore.isAltKey = e.altKey;
MainStore.isShiftKey = e.shiftKey;
if (!e.target.classList.contains("print-format-container") || MainStore.openModal) return;
if (
!(
e.target.classList.contains("print-format-container") || e.target == document.body
) ||
MainStore.openModal
)
return;
if (e.ctrlKey || e.metaKey) {
if (["a", "A"].indexOf(e.key) != -1) {
ElementStore.Elements.forEach((page) => {
Expand Down

0 comments on commit 7d82add

Please sign in to comment.