Browse Source

fix: Fixed issue with alt+c shortcut

pull/6861/head
Muhammed Mustafa 1 year ago
parent
commit
623f957853
  1. 15
      packages/nc-gui/components/smartsheet/details/Fields.vue

15
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -582,7 +582,6 @@ const toggleVisibility = async (checked: boolean, field: Field) => {
useEventListener(document, 'keydown', async (e: KeyboardEvent) => { useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
const altOrOptionKey = e.altKey
if (cmdOrCtrl) { if (cmdOrCtrl) {
switch (e.key.toLowerCase()) { switch (e.key.toLowerCase()) {
@ -592,14 +591,12 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
break break
} }
} }
if (altOrOptionKey) {
switch (e.key.toLowerCase()) { if (e.altKey && e.code === 'KeyC') {
case 'c': if (openedViewsTab.value !== 'field') return
if (openedViewsTab.value !== 'field') return
e.preventDefault() e.preventDefault()
addField() addField()
break
}
} }
}) })

Loading…
Cancel
Save