diff --git a/browser-versions.json b/browser-versions.json index 70c2f183b6..f409e32c00 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,4 +1,4 @@ { - "chrome:beta": "100.0.4896.60", - "chrome:stable": "100.0.4896.60" + "chrome:beta": "101.0.4951.15", + "chrome:stable": "100.0.4896.75" } diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 4780cf90be..0286273809 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -2363,7 +2363,7 @@ declare namespace Cypress { type Agent = SinonSpyAgent & T interface CookieDefaults { - preserve: string | string[] | RegExp | ((cookie: any) => boolean) + preserve: string | string[] | RegExp | ((cookie: Cookie) => boolean) } interface Failable { diff --git a/packages/driver/src/cy/commands/actions/type.ts b/packages/driver/src/cy/commands/actions/type.ts index 08e8e413c8..a00836000e 100644 --- a/packages/driver/src/cy/commands/actions/type.ts +++ b/packages/driver/src/cy/commands/actions/type.ts @@ -274,6 +274,7 @@ export default function (Commands, Cypress, cy, state, config) { const isContentEditable = $elements.isContentEditable(options.$el.get(0)) const isTextarea = $elements.isTextarea(options.$el.get(0)) + const isFirefoxBefore98 = Cypress.isBrowser('firefox') && Cypress.browserMajorVersion() < 98 const fireClickEvent = (el) => { const ctor = $dom.getDocumentFromElement(el).defaultView!.PointerEvent @@ -334,9 +335,16 @@ export default function (Commands, Cypress, cy, state, config) { } if ( - // Firefox sends a click event when the Space key is pressed. - // We don't want to send it twice. - !Cypress.isBrowser('firefox') && + ( + // Before Firefox 98, + // Firefox sends a click event when the Space key is pressed. + // We don't want to send it twice. + !Cypress.isBrowser('firefox') || + // After Firefox 98, + // it sends a click event automatically if the element is a