-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix blocked a frame with origin #16887
Conversation
Hi @iGerchak. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed with @VladimirZaets in slack - probable root of the issue - using object by refference that could change during the validation and cause such issue, another thing - validation might be not really good. Lets try to improve validation or clone iframe element before validation just to have only one state during processing. But currently solution is not really good because it's hiding an actual issue.
@ihor-sviziev, I tried to make a clone of the object and work with it, but this solution does not fix the issue with the jQuery error in console. |
elem.contentDocument || (elem.contentWindow ? elem.contentWindow.document : []) : | ||
$.merge([], elem.childNodes); | ||
} catch (e) { | ||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add logging of this exception as "warning" using "Magento/Ui/view/base/web/js/lib/logger/console-logger.js"
Hi @iGerchak , I am closing this PR now due to inactivity. |
Add logging of exception
Hi @ihor-sviziev, thank you for the review. |
Add logging of exception
Hi @ihor-sviziev, thank you for the review. |
Hi @iGerchak. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Preconditions
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Steps to reproduce
Expected result
Console without errors
Actual result
Tech notes
Time to time created iframe on following line: https://github.com/magento/magento2/blob/2.2-develop/lib/web/jquery.js#L3123
Our change add try-catch to this method, and when error appears - we just returning an empty array.