From 71c97b3f4a7c04088debdf6fd7efce6a8fbd8fe1 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:18:09 +0000 Subject: [PATCH] fix(nc-gui): selected cell should not go away on pressing esc multiple times --- packages/nc-gui/components/cell/SingleSelect.vue | 6 ------ packages/nc-gui/composables/useMultiSelect/index.ts | 3 --- 2 files changed, 9 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 4423cc0479..fa84c7910b 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -254,12 +254,6 @@ const onKeydown = (e: KeyboardEvent) => { if (e.key === 'Escape') { isOpen.value = false - - if (isForm.value) return - - setTimeout(() => { - aselect.value?.$el.querySelector('.ant-select-selection-search > input').focus() - }, 100) } } diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index e97755ba5b..fe143eae3d 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -767,9 +767,6 @@ export function useMultiSelect( // Handle escape if (e.key === 'Escape') { selectedRange.clear() - - activeCell.col = null - activeCell.row = null } if (unref(editEnabled) || e.ctrlKey || e.altKey || e.metaKey) {