diff --git a/packages/driver/cypress/fixtures/issue-5650.html b/packages/driver/cypress/fixtures/issue-5650.html
deleted file mode 100644
index 951d30179a89..000000000000
--- a/packages/driver/cypress/fixtures/issue-5650.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- Test input event
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/driver/cypress/integration/commands/actions/type_spec.js b/packages/driver/cypress/integration/commands/actions/type_spec.js
index 9bab40637b1b..3ae5a4a3039c 100644
--- a/packages/driver/cypress/integration/commands/actions/type_spec.js
+++ b/packages/driver/cypress/integration/commands/actions/type_spec.js
@@ -185,11 +185,18 @@ describe('src/cy/commands/actions/type - #type', () => {
})
// https://github.com/cypress-io/cypress/issues/5650
- it('should trigger KeyboardEvent, not Event, for event listeners', () => {
- cy.visit('fixtures/issue-5650.html')
+ it('should trigger KeyboardEvent, not Event, for event listeners', (done) => {
+ cy.$$('input:first').on('keydown', (e) => {
+ if (e.originalEvent instanceof e.currentTarget.ownerDocument.defaultView.KeyboardEvent) {
+ done()
+
+ return
+ }
+
+ throw new Error('event was not instanceOf KeyboardEvent')
+ })
- cy.get('#test-input').type('A')
- cy.get('#result').contains('isKeyboardEvent: true')
+ cy.get('input:first').type('A')
})
describe('actionability', () => {