Skip to content

Conversation

@stormslowly
Copy link
Collaborator

Problem

// app.jsx
function Component() {
  // throw Error("toggle the error");
  return (
    <div>
      <div>Hello</div>
    </div>
  );
}  

// index.jsx
// render to body's directly
const root = ReactDOM.createRoot(document.getElementsByTagName("body")[0]);

Make the Component throw the error, then comment the throw again.
Overlay will appears as below.
11caa6cdbafbcc1407d7e5d731eda6f3_MD5

  • When user renders app to document.body and plugin shows some error
  • User correct the error, then React re-renders document.body, removes the iframe which the plugin created and appened before; the plugin tries to remove it again. The error happens, and the overlay show a removeChild error.

@stormslowly stormslowly force-pushed the fix/remove_child_exception branch from e1d6c9a to 55d82a0 Compare September 8, 2025 06:06
@chenjiahan chenjiahan merged commit b7639ad into main Sep 8, 2025
4 checks passed
@chenjiahan chenjiahan deleted the fix/remove_child_exception branch September 8, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants