diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index eafeca7270..f2f37a84d5 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -321,6 +321,8 @@ const handleClose = (e: MouseEvent) => { !aselect.value.$el.contains(e.target) && !document.querySelector('.nc-dropdown-multi-select-cell.active')?.contains(e.target as Node) ) { + // loose focus when clicked outside + isEditable.value = false isOpen.value = false } } diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 5c0475addf..9dbd3188cc 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -217,6 +217,7 @@ const onKeydown = (e: KeyboardEvent) => { const onSelect = () => { isOpen.value = false + isEditable.value = false } const cellClickHook = inject(CellClickHookInj, null) diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vue index 31d5382b69..e7aa423376 100644 --- a/packages/nc-gui/components/smartsheet/Cell.vue +++ b/packages/nc-gui/components/smartsheet/Cell.vue @@ -189,11 +189,6 @@ onMounted(() => { intersectionObserver.value?.observe(elementToObserve.value!) }) -// remove border of element when clicked outside -onClickOutside(elementToObserve as any, () => { - editEnabled.value = false -}) - // disconnect the observer when the cell is unmounted onUnmounted(() => { intersectionObserver.value?.disconnect()