Bug #67661
closedRTE: copy and paste within RTE leads twice content input
100%
Description
Running on commit 0d0b502adcdc6517cbc22dc05c49d14fc95618bb
- also appears on 6.2.13 && 6.2.12
- does not appear in 6.2.11
Way to reproduce¶
- open RTE
- input some text
- copy with [CTRL]+[C]
- paste with [CTRL]+[V]
Copied content is inserted twice. Happens in Chrome and FF on Linux.
Updated by d.ros no-lastname-given over 8 years ago
- Assignee set to Stanislas Rolland
@stanislasrolland
could you have a look on this -> 3d95bf2a44100665be2e25a97e86ab0c03c785b8 ? I assume the commit is causing this issue.
Here Chrome 43.0.2357.125 (64-bit) is running.
Can you confirm/refuse?
Updated by d.ros no-lastname-given over 8 years ago
This is still true on 6.2.14
Cheers
Updated by d.ros no-lastname-given over 8 years ago
I broke down everything to find out what is causing this.
IF
RTE.default.buttons.pastetoggle.setActiveOnRteOpen = 1
is set. then this behaviour occours. It doesn't matter if
setup.default.rteCleanPasteBehaviour = pasteStructure
or
setup.default.rteCleanPasteBehaviour = plainText
is set.
Also disabeling the Button by hand ends this behaviour. And enabeling the button manually activates this behaviour.
Updated by Riccardo De Contardi about 8 years ago
- Status changed from New to Needs Feedback
I've tried with Chrome on MAC (latest version) on both 6.2.15 and 7 (latest master) and was not able to reproduce it:
on my TSConfig I've set:
RTE.default.showButtons = * RTE.default.buttons.pastetoggle.setActiveOnRteOpen = 1
using ctrl+c ctrl+v the behavior seems correct.
Should I perform some different test?
Updated by Riccardo De Contardi about 8 years ago
- Status changed from Needs Feedback to Closed
sorry closed for error
Updated by Riccardo De Contardi about 8 years ago
- Status changed from Closed to Needs Feedback
Updated by Tanel Põld almost 8 years ago
I do get the double paste error with Chrome. Plain text first and formatted following it. Version 47 OS X
Safari pastes plain text only even thou it should paste formatted version only.
Firefox works as it should.
TYPO3 7.6.2
Updated by Robert Wolle almost 8 years ago
I have the same Problem copying text from a document and pasting it in RTE with following configuration:
- Updated the system from 6.2.10 (in this version it worked) to 6.2.19
- pagets:
RTE { default { buttons.pastetoggle.setActiveOnRteOpen = 1 buttons.pastebehaviour.pasteStructure.keepTags = br,p,ul,ol,li buttons.pastebehaviour.pasteFormat.keepTags = br,p,ul,ol,li } }
- userts:
setup.override.rteCleanPasteBehaviour = pasteFormat
- Browser: Google Chrome: Version 48.0.2564.116 m
- Clientsystem: Windows 7
If I set the rteCleanPasteBehaviour to plainText everything works fine. The problem only occures if I use pasteStructure or pasteFormat.
This is what I want to copy:
test1 test2
This happens after pasting:
test1 test2test1<br />test2
It seems that it gives back the original plain string too.
Updated by Riccardo De Contardi over 7 years ago
I can confirm it on TYPO3 6.2.25, but it seems that the bug has been solved on 7.6.9 or the latest master.
Can someone confirm? Thanks
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Needs Feedback to New
Updated by Stefan Froemken over 7 years ago
- Status changed from New to Accepted
It works in Firefox only for default elements like in HTML. But if you copy Text from OpenOffice/LibreOffice it will add some CSS as PlainText above.
I though it has something to do with a mixture of DefaultCleanUp- and PlainText-Plugin. Both create an event on paste and will create dynamic Textfields to insert the pasted content. I have deactivated DefaultCleanUp-Plugin completely in ext_localconf.php, but this problem still appears.
Updated by Stefan Froemken over 7 years ago
That part looks a little but ugly:
while (i < contentTypes.length) { contentType = contentTypes[i]; if (/text\/plain|text\/html/.test(contentType)) { clipboardText += clipboardData.getData(contentType); } i++; }
I have just copied your example with test1 and test2, and Chrome results in TWO ClipBoards text/plain and text/html. Both are valid, so both were pasted into the RTE
Updated by Gerrit Code Review over 7 years 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/49871
Updated by Gerrit Code Review over 7 years 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/49871
Updated by Gerrit Code Review about 7 years 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/49871
Updated by Gerrit Code Review about 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49871
Updated by Tymoteusz Motylewski about 7 years ago
I could reproduce the issue with configuration from comment 8 and additionally adding
RTE.default.showButtons = *
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50343
Updated by Stefan Froemken about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 34d32feb8ab9edc46c63570bc0dc2467bc2f2317.
Updated by Torsten no-lastname-given over 6 years ago
I still run into this problem in 6.2.30 tested with Firefox 52.0.1