diff --git a/packages/nc-gui/components/cell/Currency.vue b/packages/nc-gui/components/cell/Currency.vue index 09c605ead3..51aa023d4a 100644 --- a/packages/nc-gui/components/cell/Currency.vue +++ b/packages/nc-gui/components/cell/Currency.vue @@ -83,6 +83,8 @@ onMounted(() => { @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop @contextmenu.stop diff --git a/packages/nc-gui/components/cell/Decimal.vue b/packages/nc-gui/components/cell/Decimal.vue index 11392f6d08..562a4ac858 100644 --- a/packages/nc-gui/components/cell/Decimal.vue +++ b/packages/nc-gui/components/cell/Decimal.vue @@ -55,6 +55,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputEle @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Duration.vue b/packages/nc-gui/components/cell/Duration.vue index 9e5566848b..f9c9f80eb1 100644 --- a/packages/nc-gui/components/cell/Duration.vue +++ b/packages/nc-gui/components/cell/Duration.vue @@ -96,6 +96,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputEle @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Email.vue b/packages/nc-gui/components/cell/Email.vue index 2564c7958b..b15b6d4e52 100644 --- a/packages/nc-gui/components/cell/Email.vue +++ b/packages/nc-gui/components/cell/Email.vue @@ -64,6 +64,8 @@ watch( @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Float.vue b/packages/nc-gui/components/cell/Float.vue index feba9beba0..f6a12934cb 100644 --- a/packages/nc-gui/components/cell/Float.vue +++ b/packages/nc-gui/components/cell/Float.vue @@ -55,6 +55,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputEle @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Integer.vue b/packages/nc-gui/components/cell/Integer.vue index 6129431271..0800c09823 100644 --- a/packages/nc-gui/components/cell/Integer.vue +++ b/packages/nc-gui/components/cell/Integer.vue @@ -41,6 +41,15 @@ const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus() function onKeyDown(evt: KeyboardEvent) { + const cmdOrCtrl = isMac() ? evt.metaKey : evt.ctrlKey + if (cmdOrCtrl && !evt.altKey) { + switch (evt.keyCode) { + case 90: { + evt.stopPropagation() + break + } + } + } return evt.key === '.' && evt.preventDefault() } diff --git a/packages/nc-gui/components/cell/Percent.vue b/packages/nc-gui/components/cell/Percent.vue index b357a3714d..42face46a6 100644 --- a/packages/nc-gui/components/cell/Percent.vue +++ b/packages/nc-gui/components/cell/Percent.vue @@ -46,6 +46,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputEle @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Text.vue b/packages/nc-gui/components/cell/Text.vue index 95c1ad35b0..1d4e11ad05 100644 --- a/packages/nc-gui/components/cell/Text.vue +++ b/packages/nc-gui/components/cell/Text.vue @@ -38,6 +38,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputEle @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/TextArea.vue b/packages/nc-gui/components/cell/TextArea.vue index d8e6a07e78..6b7d2b1406 100644 --- a/packages/nc-gui/components/cell/TextArea.vue +++ b/packages/nc-gui/components/cell/TextArea.vue @@ -37,6 +37,8 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLTextArea @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop /> diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index 032d5d2797..0c1a207627 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -93,6 +93,8 @@ watch( @keydown.right.stop @keydown.up.stop @keydown.delete.stop + @keydown.ctrl.z.stop + @keydown.meta.z.stop @selectstart.capture.stop @mousedown.stop />