Skip to content

Investigate different behavior for input events of [keyboard.spec] Keyboard should report shiftKey #11599

@whimboo

Description

@whimboo

This specific test actually tests more than the shift key which means including the Alt and Control modifiers. So maybe the name of the test is not that accurate.

Nevertheless when running the test code for Alt I can see that input events are emitted by Firefox which seems to be right at least when checking manually on: https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html. Using the same page with Chrome I can see input events as well.

So why do we assume that when Alt is pressed, no input event is emitted? Could this be a bug in the CDP protocol?

if (modifierKey === 'Shift') {
expect(
await page.evaluate(() => {
return (globalThis as any).getResult();
})
).toBe(
`Keydown: ! Digit1 [${modifierKey}]\n` + `input: ! insertText false`
);
} else {
expect(
await page.evaluate(() => {
return (globalThis as any).getResult();
})
).toBe(`Keydown: ! Digit1 [${modifierKey}]`);
}

CC @OrKoN.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions