Iframe is broken when the component is removed from DOM by React
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the TinyMCE React component’s handling of iframe removal and reload, using the linked reproduction CodeSandbox to observe the failure. The issue does not name repository files or tests, and leaves open whether the fix belongs in this component or TinyMCE itself. Done means the editor detects the iframe reload and reinitializes, as expected for an unmount/remount.
Written by the indexing model from the issue text.
Description
What is the current behavior?
React uses add/remove to manipulate DOM. But when iframe is removed from DOM it looses its context (see https://github.com/whatwg/dom/issues/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
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tinymce/tinymce-react
-
status: escalated
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
tinymce/tinymce-react#617 ·
-
smart_paste doesn't detected pasted urls as linkPossibly taken @hardikpedia claimed this 50 days ago. Openstatus: escalated
Difficulty 3/5 1-2 days Newbie friendliness 55/100
tinymce/tinymce-react#611 · 1 comment ·
-
needs: more info
Difficulty 4/5 3-5 days Newbie friendliness 20/100
tinymce/tinymce-react#595 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tinymce/tinymce-react#587 · 15 comments · 3 reactions ·
-
GitHub status: escalated
Difficulty 3/5 1-2 days Newbie friendliness 25/100
tinymce/tinymce-react#501 · 5 comments · 8 reactions ·
All issues in tinymce/tinymce-react
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tenstorrent/ttnn-visualizer#2526 ·
Maintainers usually reply within 1 day
-
trySessionCache calls /get-session twice when minting session_data (cache miss or expired cookie)Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
neondatabase/neon-js#301 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tashfeenahmed/freellmapi#2305 ·
Maintainers usually reply within 1 day