fix: prevent panel close when interacting with select dropdown

Amp-Thread-ID: https://ampcode.com/threads/T-019bc9c3-5f90-712a-ad23-8df1b17034eb
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-01-16 18:45:28 -08:00
parent df74315194
commit 2839731819
2 changed files with 7 additions and 1 deletions

View File

@@ -165,6 +165,12 @@ onClickOutside(
cardRef,
() => {
if (focused) {
const activeElement = document.activeElement
const isSelectInPanel =
activeElement?.tagName === 'SELECT' &&
activeElement.closest('[data-component-id="ModelInfoPanel"]')
if (isSelectInPanel) return
emit('blur')
}
},

View File

@@ -140,7 +140,7 @@
:disabled="isImmutable"
:placeholder="$t('assetBrowser.modelInfo.descriptionPlaceholder')"
rows="3"
class="w-full resize-y rounded-lg border-2 border-transparent bg-secondary-background px-3 py-2 text-sm text-base-foreground outline-none focus:border-node-component-border disabled:cursor-not-allowed disabled:opacity-50"
class="w-full resize-y rounded-lg border border-transparent bg-transparent px-3 py-2 text-sm text-component-node-foreground outline-none transition-colors focus:bg-component-node-widget-background disabled:pointer-events-none"
/>
</ModelInfoField>
</PropertiesAccordionItem>