diff --git a/packages/nc-gui/components/virtual-cell/components/ListItems.vue b/packages/nc-gui/components/virtual-cell/components/ListItems.vue index 63519f5835..448b408b82 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListItems.vue @@ -8,6 +8,7 @@ import { IsPublicInj, computed, inject, + isDrawerExist, ref, useLTARStoreOrThrow, useSelectedCellKeyupListener, @@ -145,7 +146,7 @@ useSelectedCellKeyupListener(vModel, (e: KeyboardEvent) => { break default: { const el = filterQueryRef.value?.$el - if (el) { + if (el && !isDrawerExist()) { filterQueryRef.value.$el.focus() } } diff --git a/packages/nc-gui/utils/browserUtils.ts b/packages/nc-gui/utils/browserUtils.ts index 2b48c5972b..e4691540e5 100644 --- a/packages/nc-gui/utils/browserUtils.ts +++ b/packages/nc-gui/utils/browserUtils.ts @@ -1,3 +1,4 @@ // refer - https://stackoverflow.com/a/11752084 export const isMac = () => /Mac/i.test(navigator.platform) +export const isDrawerExist = () => document.querySelector('.ant-drawer-open') export const isDrawerOrModalExist = () => document.querySelector('.ant-modal.active, .ant-drawer-open')