Bug #79468

RTE breaks apart if you move it up or down

Added by Mona Muzaffar over 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend JavaScript
Target version:
-
Start date:
2017-01-25
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When you have two RTEs as inline elements, which you can expand/hide and move up/down, and try to move them with the arrow buttons they break apart.
After saving the element it appears normal again.

You can test this with the styleguide extension by creating a TCA demo tree and choosing the inline tab on page 'elements rte'. When you create a second inline rte element and move it up or down it will break apart.

Bildschirmfoto 2017-01-25 um 16.23.57.png View (98.8 KB) Mona Muzaffar, 2017-01-25 16:31


Related issues

Duplicated by TYPO3 Core - Bug #79882: RTE disapears after sorting an extbase entity Closed 2017-02-17

Associated revisions

Revision 0b27b0a9 (diff)
Added by Frank Naegler 11 months ago

[BUGFIX] Re-Init CKEditor after re-sorting of inline records

This patch triggers an event and uses this event to re-init the
CKEditor after re-sorting inline records.

Resolves: #79468
Releases: master, 8.7
Change-Id: Ib7d0ad6c1b0cb6b292b3dfa8488a6528ff74ceee
Reviewed-on: https://review.typo3.org/57382
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision ad66e36a (diff)
Added by Frank Naegler 11 months ago

[BUGFIX] Re-Init CKEditor after re-sorting of inline records

This patch triggers an event and uses this event to re-init the
CKEditor after re-sorting inline records.

Resolves: #79468
Releases: master, 8.7
Change-Id: Ib7d0ad6c1b0cb6b292b3dfa8488a6528ff74ceee
Reviewed-on: https://review.typo3.org/57392
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Mona Muzaffar over 2 years ago

  • Category set to Backend JavaScript
  • Priority changed from Should have to Must have
  • Target version set to 8.6

#2 Updated by Andreas Kiessling over 2 years ago

I have the same bug in TYPO3 7.6, this worked like a charm in 6.2 though

#3 Updated by Andreas Kiessling over 2 years ago

It seems like this is a general problem with Iframes that are moved in the DOM. An Iframe loses its state and is usually refreshed. But since the RTE is dynamically created, there is nothing to refresh.
In TYPO3 6.2 the code was similar, did something change in the RTE handling in that area? Like a regular check if the RTE instance is still working or needs to be reinitialized?

#4 Updated by Andreas Kiessling over 2 years ago

I have to correct myself: this did not work in 6.2 either, but the Iframe sourcecode does not show up, it's just empty. To reproduce the bug, the inline element with the RTE needs to be moved, not another one pre- or appended. Is the only solution to trigger the RTE initialization again? The content of the textarea is not lost, just maybe the cursor position.

#5 Updated by Benni Mack over 2 years ago

  • Target version changed from 8.6 to 8 LTS

#6 Updated by Mona Muzaffar over 2 years ago

  • Sprint Focus set to Stabilization Sprint

#7 Updated by Mona Muzaffar over 2 years ago

This also happens with the CKEditor and t3editor as soon as open inline elements are sorted and flex sorting.

#8 Updated by Frank Naegler about 2 years ago

This is a known problem. an iframe can not be moved within the dom without reloadind / re-init.

A solution could be to trigger an event after resorting the inline elements. Each element can listen to this event and re-init if required.

The following element need the possibility to re-init before this can be fixed:

- t3editor
- rtehmlarea
- ckeditor

#9 Updated by Christian Kuhn about 2 years ago

  • Target version deleted (8 LTS)
  • Sprint Focus deleted (Stabilization Sprint)

#10 Updated by Christian Kuhn about 2 years ago

that's an issue with re-init of moved iframes. guess we will not be able to fix that until 8.7.0 lts anymore.

#11 Updated by Frank Naegler 11 months ago

  • Priority changed from Must have to Should have

As mentioned one year ago, this is not possible to fix, you can find some reasons here: https://stackoverflow.com/questions/8318264/how-to-move-an-iframe-in-the-dom-without-losing-its-state
I think we should close this issue.

#12 Updated by Frank Naegler 11 months ago

  • Status changed from New to Accepted
  • Assignee set to Frank Naegler

#13 Updated by Gerrit Code Review 11 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57382

#14 Updated by Gerrit Code Review 11 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57382

#15 Updated by Gerrit Code Review 11 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57382

#16 Updated by Frank Naegler 11 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#17 Updated by Gerrit Code Review 11 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57392

#18 Updated by Frank Naegler 11 months ago

  • Status changed from Under Review to Resolved

#19 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF