Project

General

Profile

Actions

Bug #67661

closed

RTE: copy and paste within RTE leads twice content input

Added by d.ros no-lastname-given over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2015-06-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

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.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #67503: [RTE] [onlyChrome] Paste double with and without structure if "Disable Paste Structure" is enabledClosedStanislas Rolland2015-03-12

Actions
Actions #1

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.

https://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff/0671b4ca5e6ec661e0d0c0ccd0e46888f2fcbd9d..3d95bf2a44100665be2e25a97e86ab0c03c785b8:/typo3/sysext/rtehtmlarea/htmlarea/plugins/PlainText/plain-text.js

Here Chrome 43.0.2357.125 (64-bit) is running.

Can you confirm/refuse?

Actions #2

Updated by d.ros no-lastname-given over 8 years ago

This is still true on 6.2.14

Cheers

Actions #3

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.

Actions #4

Updated by Riccardo De Contardi over 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?

Actions #5

Updated by Riccardo De Contardi over 8 years ago

  • Status changed from Needs Feedback to Closed

sorry closed for error

Actions #6

Updated by Riccardo De Contardi over 8 years ago

  • Status changed from Closed to Needs Feedback
Actions #7

Updated by Tanel Põld about 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

Actions #8

Updated by Robert Wolle about 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.

Actions #9

Updated by Riccardo De Contardi almost 8 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

Actions #10

Updated by Sven Ignor over 7 years ago

In 7.6.10 it is still there

Actions #11

Updated by Rafal Brzeski over 7 years ago

confirm this on TYPO3 7.6.10

Actions #12

Updated by Riccardo De Contardi over 7 years ago

  • Status changed from Needs Feedback to New
Actions #13

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.

Actions #14

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

Actions #15

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

Actions #16

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

Actions #17

Updated by Gerrit Code Review over 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

Actions #18

Updated by Gerrit Code Review over 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

Actions #19

Updated by Jan Helke over 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #20

Updated by Tymoteusz Motylewski over 7 years ago

I could reproduce the issue with configuration from comment 8 and additionally adding

RTE.default.showButtons = *

Actions #21

Updated by Gerrit Code Review over 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

Actions #22

Updated by Stefan Froemken over 7 years ago

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

Updated by Torsten no-lastname-given almost 7 years ago

I still run into this problem in 6.2.30 tested with Firefox 52.0.1

Actions #24

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF