diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 7905bc9d1f..3a31bc6ddf 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'remove-json-lint' + - 'jquery-patch-remove-unload' - 'publish-binary' - 'chore/use_build_docker_file_for_centos7' @@ -55,6 +55,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - equal: [ 'chore/use_build_docker_file_for_centos7', << pipeline.git.branch >> ] + - equal: [ 'jquery-patch-remove-unload', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 3fd8edb16e..a2f77a1834 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -5,6 +5,7 @@ _Released 8/13/2024 (PENDING)_ **Bugfixes:** +- A console error will no longer display in Chrome about a deprecated unload call originating from jQuery. Addressed in [#29944](https://github.com/cypress-io/cypress/pull/29944). - Fixed an issue where certain Test Replay upload error messages were too vague. Connection failures now report the precise system error, and the stall error message is reported rather than the vague, "The user aborted a request." Addressed in [#29959](https://github.com/cypress-io/cypress/pull/29959). **Misc:** diff --git a/packages/driver/patches/jquery+3.4.1.dev.patch b/packages/driver/patches/jquery+3.4.1.dev.patch index c75eca4eda..c295f6eba5 100644 --- a/packages/driver/patches/jquery+3.4.1.dev.patch +++ b/packages/driver/patches/jquery+3.4.1.dev.patch @@ -72,10 +72,40 @@ index 411a859..0000000 -}); -``` diff --git a/node_modules/jquery/dist/jquery.js b/node_modules/jquery/dist/jquery.js -index 773ad95..9e6076f 100644 +index 773ad95..84ca2f6 100644 --- a/node_modules/jquery/dist/jquery.js +++ b/node_modules/jquery/dist/jquery.js -@@ -6534,69 +6534,100 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed +@@ -1100,19 +1100,17 @@ setDocument = Sizzle.setDocument = function( node ) { + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + +- // Support: IE 9-11, Edge +- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) +- if ( preferredDoc !== document && +- (subWindow = document.defaultView) && subWindow.top !== subWindow ) { ++ // Support: IE 9 - 11+, Edge 12 - 18+ ++ // Accessing iframe documents after unload throws "permission denied" errors (see trac-13936) ++ // Support: IE 11+, Edge 17 - 18+ ++ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing ++ // two documents; shallow comparisons work. ++ // eslint-disable-next-line eqeqeq ++ if ( preferredDoc != document && ++ ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + +- // Support: IE 11, Edge +- if ( subWindow.addEventListener ) { +- subWindow.addEventListener( "unload", unloadHandler, false ); +- +- // Support: IE 9 - 10 only +- } else if ( subWindow.attachEvent ) { +- subWindow.attachEvent( "onunload", unloadHandler ); +- } ++ // Support: IE 9 - 11+, Edge 12 - 18+ ++ subWindow.addEventListener( "unload", unloadHandler ); + } + + /* Attributes +@@ -6534,69 +6491,100 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed return delta; } @@ -220,4 +250,4 @@ index 773ad95..9e6076f 100644 + styles ) ) + "px"; - } + } \ No newline at end of file