Browse Source

fix: stop undo actions on event for inputs

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6835/head
mertmit 9 months ago
parent
commit
c01194b841
  1. 2
      packages/nc-gui/components/cell/Currency.vue
  2. 2
      packages/nc-gui/components/cell/Decimal.vue
  3. 2
      packages/nc-gui/components/cell/Duration.vue
  4. 2
      packages/nc-gui/components/cell/Email.vue
  5. 2
      packages/nc-gui/components/cell/Float.vue
  6. 2
      packages/nc-gui/components/cell/Percent.vue
  7. 2
      packages/nc-gui/components/cell/PhoneNumber.vue
  8. 2
      packages/nc-gui/components/cell/Text.vue
  9. 2
      packages/nc-gui/components/cell/TextArea.vue
  10. 2
      packages/nc-gui/components/cell/Url.vue
  11. 3
      packages/nc-gui/composables/useUndoRedo.ts

2
packages/nc-gui/components/cell/Currency.vue

@ -86,8 +86,6 @@ 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

2
packages/nc-gui/components/cell/Decimal.vue

@ -105,8 +105,6 @@ watch(isExpandedFormOpen, () => {
@keydown.right.stop
@keydown.up.stop="onKeyDown"
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Duration.vue

@ -103,8 +103,6 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Email.vue

@ -78,8 +78,6 @@ watch(
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Float.vue

@ -58,8 +58,6 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Percent.vue

@ -49,8 +49,6 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/PhoneNumber.vue

@ -70,8 +70,6 @@ watch(
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Text.vue

@ -43,8 +43,6 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/TextArea.vue

@ -100,8 +100,6 @@ onClickOutside(inputWrapperRef, (e) => {
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

2
packages/nc-gui/components/cell/Url.vue

@ -99,8 +99,6 @@ watch(
@keydown.right.stop
@keydown.up.stop
@keydown.delete.stop
@keydown.ctrl.z.stop
@keydown.meta.z.stop
@selectstart.capture.stop
@mousedown.stop
/>

3
packages/nc-gui/composables/useUndoRedo.ts

@ -158,6 +158,9 @@ export const useUndoRedo = createSharedComposable(() => {
useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
if (e && (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)) return
if (cmdOrCtrl && !e.altKey) {
switch (e.keyCode) {
case 90: {

Loading…
Cancel
Save