From ebe791395a7af6a93a6150ba8b11b7e4279e34f5 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:42:19 +0000 Subject: [PATCH 01/15] fix: in richtext editor on backspace field status changes to deleted field --- .../components/smartsheet/details/Fields.vue | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index e9c5ade692..8361b960aa 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -631,8 +631,14 @@ onKeyDown('ArrowUp', () => { onKeyDown('Delete', () => { if (isLocked.value) return - if (document.activeElement?.tagName === 'INPUT') return - if (document.activeElement?.tagName === 'TEXTAREA') return + if ( + document.activeElement?.tagName === 'INPUT' || + document.activeElement?.tagName === 'TEXTAREA' || + // A rich text editor is a div with the contenteditable attribute set to true. + document.activeElement?.getAttribute('contenteditable') + ) { + return + } const isDeletedField = fieldStatus(activeField.value) === 'delete' if (!isDeletedField && activeField.value) { @@ -643,8 +649,14 @@ onKeyDown('Delete', () => { onKeyDown('Backspace', () => { if (isLocked.value) return - if (document.activeElement?.tagName === 'INPUT') return - if (document.activeElement?.tagName === 'TEXTAREA') return + if ( + document.activeElement?.tagName === 'INPUT' || + document.activeElement?.tagName === 'TEXTAREA' || + // A rich text editor is a div with the contenteditable attribute set to true. + document.activeElement?.getAttribute('contenteditable') + ) { + return + } const isDeletedField = fieldStatus(activeField.value) === 'delete' if (!isDeletedField && activeField.value) { From 7a569443a16746e46e5ce35bd0e4e87627f291c3 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:42:19 +0000 Subject: [PATCH 02/15] fix: lint errors --- packages/nc-gui/components/smartsheet/VirtualCell.vue | 2 +- .../nc-gui/components/smartsheet/grid/GroupByLabel.vue | 2 +- .../virtual-cell/components/ListChildItems.vue | 3 +-- .../components/virtual-cell/components/ListItems.vue | 2 +- packages/nc-gui/composables/useLTARStore.ts | 10 +++++----- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/VirtualCell.vue b/packages/nc-gui/components/smartsheet/VirtualCell.vue index 51a0a03a87..47e8c7c4d9 100644 --- a/packages/nc-gui/components/smartsheet/VirtualCell.vue +++ b/packages/nc-gui/components/smartsheet/VirtualCell.vue @@ -20,11 +20,11 @@ import { isLink, isLookup, isMm, + isPrimary, isQrCode, isRollup, provide, toRef, - isPrimary, } from '#imports' import type { Row } from '#imports' diff --git a/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue b/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue index 977742537e..7c6dd3aa96 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue @@ -1,7 +1,7 @@