Ignore reserved keybindings when typing in text input (#2514)

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
bymyself
2025-02-12 09:15:19 -07:00
committed by GitHub
parent 150b4341b2
commit 46f0733ae7
4 changed files with 71 additions and 2 deletions

View File

@@ -35,4 +35,20 @@ test.describe('Keybindings', () => {
true
)
})
test('Should not trigger keybinding reserved by text input when typing in input fields', async ({
comfyPage
}) => {
await comfyPage.registerKeybinding({ key: 'Ctrl+v' }, () => {
window['TestCommand'] = true
})
const textBox = comfyPage.widgetTextBox
await textBox.click()
await textBox.press('Control+v')
await expect(textBox).toBeFocused()
expect(await comfyPage.page.evaluate(() => window['TestCommand'])).toBe(
undefined
)
})
})