Browse Source

fix(nc-gui): disable link cell paste if link record dropdown is open (#9887)

pull/9892/head
Ramesh Mane 4 days ago committed by GitHub
parent
commit
52faf2f3b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/nc-gui/components/virtual-cell/components/LinkRecordDropdown.vue
  2. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  3. 1
      packages/nc-gui/utils/browserUtils.ts

2
packages/nc-gui/components/virtual-cell/components/LinkRecordDropdown.vue

@ -63,7 +63,7 @@ watch([ncLinksDropdownRef, isOpen], () => {
<NcDropdown
:visible="isOpen"
placement="bottom"
overlay-class-name="nc-links-dropdown !min-w-[540px] xs:(!min-w-[90vw])"
:overlay-class-name="`nc-links-dropdown !min-w-[540px] xs:(!min-w-[90vw]) ${isOpen ? 'active' : ''}`"
:class="`.nc-${randomClass}`"
>
<slot />

2
packages/nc-gui/composables/useMultiSelect/index.ts

@ -911,7 +911,7 @@ export function useMultiSelect(
return
}
if (isDrawerOrModalExist() || isExpandedCellInputExist()) {
if (isDrawerOrModalExist() || isExpandedCellInputExist() || isLinkDropdownExist()) {
return
}

1
packages/nc-gui/utils/browserUtils.ts

@ -1,6 +1,7 @@
// refer - https://stackoverflow.com/a/11752084
export const isMac = () => /Mac/i.test(navigator.platform)
export const isDrawerExist = () => document.querySelector('.ant-drawer-open')
export const isLinkDropdownExist = () => document.querySelector('.nc-links-dropdown.active')
export const isDrawerOrModalExist = () => document.querySelector('.ant-modal.active, .ant-drawer-open')
export const isExpandedFormOpenExist = () => document.querySelector('.nc-drawer-expanded-form.active')
export const isExpandedCellInputExist = () => document.querySelector('.expanded-cell-input')

Loading…
Cancel
Save