mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-19 22:34:15 +00:00
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:
@@ -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')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user