Skip to content

Commit

Permalink
chore: merge develop into main (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
maharshivpatel authored Sep 30, 2024
2 parents 568dce8 + c29bebd commit 58f88c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const getMarginContainerStyle = computed(() => {
onMounted(() => {
// TODO: Refactor this as per the new store structure
ElementStore.$subscribe((mutation, state) => {
if (!(mutation?.events)) return;
if (
(mutation.events.type === "set" && mutation.events.key == "Elements") ||
(mutation.events.type === "add" && mutation.events.newValue.parent?.type == "page")
Expand Down
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 58f88c8

Please sign in to comment.