diff --git a/packages/nc-gui/composables/useSelectedCellKeyupListener/index.ts b/packages/nc-gui/composables/useSelectedCellKeyupListener/index.ts index 1b64dbd614..d7896d3caa 100644 --- a/packages/nc-gui/composables/useSelectedCellKeyupListener/index.ts +++ b/packages/nc-gui/composables/useSelectedCellKeyupListener/index.ts @@ -7,7 +7,8 @@ function useSelectedCellKeyupListener( { immediate = false }: { immediate?: boolean } = {}, ) { const finalHandler = (e: KeyboardEvent) => { - if (cmdKActive()) return + if (cmdKActive() || isExpandedFormOpenExist() || isExpandedCellInputExist() || isFieldEditOrAddDropdownOpen()) return + // TODO: Check if their is any active element which is outside grid then return handler(e) } diff --git a/packages/nc-gui/utils/browserUtils.ts b/packages/nc-gui/utils/browserUtils.ts index e79cb7319c..ec56c84f03 100644 --- a/packages/nc-gui/utils/browserUtils.ts +++ b/packages/nc-gui/utils/browserUtils.ts @@ -14,6 +14,7 @@ export const isActiveInputElementExist = () => { !!document.activeElement?.getAttribute('contenteditable') ) } +export const isFieldEditOrAddDropdownOpen = () => document.querySelector('.nc-dropdown-edit-column.active') export const getScrollbarWidth = () => { const outer = document.createElement('div') outer.style.visibility = 'hidden'