diff --git a/browser_tests/propertiesPanel.spec.ts b/browser_tests/propertiesPanel.spec.ts new file mode 100644 index 000000000..8e889f3aa --- /dev/null +++ b/browser_tests/propertiesPanel.spec.ts @@ -0,0 +1,24 @@ +import { expect } from '@playwright/test' +import { comfyPageFixture as test } from './ComfyPage' + +test.describe('Properties Panel', () => { + test('Can change property value', async ({ comfyPage }) => { + await comfyPage.setSetting('Comfy.UseNewMenu', 'Top') + await comfyPage.rightClickEmptyLatentNode() + await comfyPage.page.getByText('Properties Panel').click() + await comfyPage.nextFrame() + await expect(comfyPage.canvas).toHaveScreenshot( + 'right-click-node-properties-panel.png' + ) + const propertyInput = comfyPage.page.locator('span.property_value').first() + + // Ensure no keybinds are triggered while typing + await propertyInput.pressSequentially('abcdefghijklmnopqrstuvwxyz') + await expect(comfyPage.canvas).toHaveScreenshot( + 'right-click-node-properties-panel-property-changed.png' + ) + + await propertyInput.fill('Empty Latent Image') + await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled') + }) +}) diff --git a/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-chromium-linux.png b/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-chromium-linux.png new file mode 100644 index 000000000..c94e14424 Binary files /dev/null and b/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-chromium-linux.png differ diff --git a/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-property-changed-chromium-linux.png b/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-property-changed-chromium-linux.png new file mode 100644 index 000000000..169439eb9 Binary files /dev/null and b/browser_tests/propertiesPanel.spec.ts-snapshots/right-click-node-properties-panel-property-changed-chromium-linux.png differ diff --git a/src/extensions/core/keybinds.ts b/src/extensions/core/keybinds.ts index 8b2c0cdbf..3177a5069 100644 --- a/src/extensions/core/keybinds.ts +++ b/src/extensions/core/keybinds.ts @@ -27,7 +27,12 @@ app.registerExtension({ } const target = event.composedPath()[0] - if (['INPUT', 'TEXTAREA'].includes(target.tagName)) { + if ( + target.tagName === 'TEXTAREA' || + target.tagName === 'INPUT' || + (target.tagName === 'SPAN' && + target.classList.contains('property_value')) + ) { return }