mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 08:14:06 +00:00
* Fix hotkeys triggering while editing properties panel values (#606) * Add properties panel inputs to key handler ignore * Add properties panel test * Update test expectations [skip ci] --------- Co-authored-by: bymyself <abolkonsky.rem@gmail.com> Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
24
browser_tests/propertiesPanel.spec.ts
Normal file
24
browser_tests/propertiesPanel.spec.ts
Normal file
@@ -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')
|
||||
})
|
||||
})
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user