Skip to content

Iframe is broken when the component is removed from DOM by React #403

@moroine

Description

@moroine

What is the current behavior?
React uses add/remove to manipulate DOM. But when iframe is removed from DOM it looses its context (see whatwg/dom#891).

TinyMce doesn't detect iframe reload

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.
https://codesandbox.io/embed/eloquent-heisenberg-du24mx?fontsize=14&hidenavigation=1&theme=dark

What is the expected behavior?

TinyMce detect iframe reload, and reinitialize (similarly to unmount/remount). Not sure if the fix should be part of main tinymce 🤔

But here is a workaround https://codesandbox.io/s/cool-meadow-zrr0t1?file=/src/index.js

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

  • TinyMCE: 4.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    GitHubIssues that have been added to our internal issue tracker.bugA replicated bug.status: escalated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions