Skip to content
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

Wrong polyfill for HTMLElement.prototype.remove throw error in edge case. #35387

Open
1 task done
EladHeller opened this issue Apr 27, 2022 · 10 comments
Open
1 task done
Labels
Area: UI Framework Component: Console Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@EladHeller
Copy link

EladHeller commented Apr 27, 2022

Preconditions (*)

Magento/2.4 (Enterprise)

Steps to reproduce (*)

In javascript code, create an element without parent, then call remove function. For example:
document.createElement('div').remove()

  1. Browse to Magento 2.4 website.
  2. Open console
  3. Run document.createElement('div').remove()

Expected result (*)

Nothing happen.

Actual result (*)

An exception thrown:

Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
    at remove (legacy-build.min.js:formatted:1759:22)
    at HTMLDivElement._methodized [as remove] (legacy-build.min.js:formatted:396:22)
    at <anonymous>:1:31

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
@m2-assistant
Copy link

m2-assistant bot commented Apr 27, 2022

Hi @EladHeller. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Apr 27, 2022

Hi @EladHeller! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@m2-community-project m2-community-project bot added the Priority: P3 May be fixed according to the position in the backlog. label Apr 28, 2022
@engcom-November engcom-November added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Apr 29, 2022
@engcom-November engcom-November self-assigned this Jan 13, 2023
@m2-assistant
Copy link

m2-assistant bot commented Jan 13, 2023

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hi @EladHeller ,
Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is reproducible. Hence updating the description and confirming the issue.
Steps performed:

  1. Browse to Magento 2.4 website.
  2. Open console
  3. Run document.createElement('div').remove()
    image

@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Console Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reported on 2.4.x Indicates original Magento version for the Issue report. Area: UI Framework labels Jan 13, 2023
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-7666 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Jan 13, 2023

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@kanidaya
Copy link

i am facing same issue i can't able to click and save admin store configuration can you please share quick fix for this

@EladHeller
Copy link
Author

@kanidaya
I proposed a solution in #35388, but I haven't had the time to follow up and get it merged.

@kanidaya
Copy link

kanidaya commented Aug 20, 2024

@EladHeller this change already there in 2.4.7-p2 but still i am getting below while admin configuration

legacy-build.min.js:12 Uncaught TypeError: ah.dispatchEvent is not a function
at r (legacy-build.min.js:12:32795)
at D (legacy-build.min.js:12:32626)
at HTMLDocument._methodized [as fire] (legacy-build.min.js:1:6441)
at d (legacy-build.min.js:12:34954)
at legacy-build.min.js:12:34408Understand this error
legacy-build.min.js:12 Uncaught TypeError: $(...).removeClassName is not a function
at Object.applyCollapse (legacy-build.min.js:12:147567)
at Object.toggleCollapse (legacy-build.min.js:12:148155)
at HTMLAnchorElement.eventListener9tmbiETHAp (6c8471f696931ebcf4ba741ab4a76321ac03408b6b79a9af71a9e0f07aa8885b/:475:41)
at element.onclick (6c8471f696931ebcf4ba741ab4a76321ac03408b6b79a9af71a9e0f07aa8885b/:486:52)

@kanidaya
Copy link

created issue #39066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: UI Framework Component: Console Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Ready for Development
Development

Successfully merging a pull request may close this issue.

4 participants