magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

[Issue] Remove `Array.from` polyfill from PrototypeJS 1.7.3 included in `legacy-build.min.js` #38914

Open m2-assistant[bot] opened 1 month ago

m2-assistant[bot] commented 1 month ago

This issue is automatically created based on existing pull request: magento/magento2#38911: Remove Array.from polyfill from PrototypeJS 1.7.3 included in legacy-build.min.js


PrototypeJS v1.7.3 included in legacy-build.min.js breaks native Array.from by forcing its own polyfill implementation effectively breaking 3rd party code run on Magento frontend. I

Steps to reproduce

Expected output

Description (*)

Commenting out Array.from=$A; from legacy-build.min.js

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#

Manual testing scenarios (*)

Steps to reproduce

Expected output

Questions or comments

Contribution checklist (*)

m2-assistant[bot] commented 1 month ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 1 month ago

Hello @stefanbackor,

Thank you for the report and collaboration!

We are not able to reproduce this on 2.4-develop. With PrototypeJS 1.7.3 we got the expected result:

image

Please let us know if we are missing something.

Thank you.

stefanbackor commented 1 month ago

@engcom-November legacy-build.min.js has to be loaded since this is the script which delivers PrototypeJS. Default theme (installation) does not load such file into storefront. Could legacy-build.min.js be theme dependent?

Searching thru codebase reveals few hacks in regards of Array.from and uppy library.

Testing on Admin Backend does have this issue present.