mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-21 06:30:49 -06:00
fix: remove IE code that is calling deprecated unload event (#29944)
* fix: remove IE code that is calling deprecated unload event * Add changelog entry * Add new logic around checks on whether to add unload handler * missing important things here * revert previous changes * patch with new reqs for edge * commit missing line * Put back some code * Update cli/CHANGELOG.md * build binary to test fix * update workflow
This commit is contained in:
@@ -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 >>
|
||||
|
||||
@@ -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:**
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user