Skip to content

Conversation

@xabg2
Copy link
Contributor

@xabg2 xabg2 commented Jan 23, 2026

Description

When the browser’s built-in translation feature is enabled, it mutates the DOM after the initial render. This can cause React to lose track of its internal node references and trigger a NotFoundError: Failed to execute 'removeChild' in Edge, leaving the app in a broken state.

This PR introduces a defensive patch that guards against invalid removeChild calls by ensuring the node is still a child of its parent before attempting removal. This prevents crashes caused by browser translation tools while preserving the expected application behavior.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 23, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 56c65d5
Status: ✅  Deploy successful!
Preview URL: https://2fd85291.drive-web.pages.dev
Branch Preview URL: https://fix-avoid-removing-the-ifram.drive-web.pages.dev

View logs

@xabg2 xabg2 self-assigned this Jan 23, 2026
@xabg2 xabg2 added the bug Something isn't working label Jan 23, 2026
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants