Item8981: Broken copy - paste of list items

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Extension
Component: TinyMCEPlugin
Branches:
Reported By: Foswiki:Main.PaulHarvey
Waiting For:
Last Change By: GeorgeClark
User agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100414 Iceweasel/3.5.9 (like Firefox/3.5.9) Screen info: 1050x1680x24

Description of problem: Copying a selection of list items into a different part of the list results in a list broken in three around the pasted selection, with an extraneous extra list item

1. At http://tinymce.moxiecode.com/examples/full.php using a webkit or gecko browser

2. Position cursor at end of document, on a newlines

3. Create a bullet list as follows:
  • a
  • b
  • c
  • d

4. Select items b and c

5. Ctrl+c copy

6. Position cursor in front of 'b'

7. paste

Expected: a list that looks like
  • a
  • b
  • c
  • b
  • c
  • d

Actual:
  • a

  • b
  • c
  •  

  • b
  • c
  • d

Reproduced on:
  • Google Chrome 4.1.249.1064 on 32-bit XP SP3
  • Google Chrome 5.0.307.5 dev on 64-bit Debian Lenny
  • Firefox 3.6.3 on 32-bit XP SP3
  • Iceweasel (Firefox) 3.5.9 on 64-bit Debian Lenny

Did not reproduce on:
  • Internet Explorer 6.00.2900.2180 on 32-bit XP SP3 - sometimes the paste doesn't show up as a rounded bullet (as if it was just a
    continuation of the previous bullet)
  • Internet Explorer 7.00.5730.13 on 32-bit XP SP3
  • IE 8.0.6001.18702 on 32-bit XP SP3

-- PaulHarvey - 06 May 2010

Sourceforge bug at https://sourceforge.net/tracker/?func=detail&aid=2997398&group_id=103281&atid=635682

-- PaulHarvey - 06 May 2010

This isn't a fix, but will push to github to see if spocke has any ideas. (it fixes the problem where it splits up the list. It likely breaks other things.)

--- a/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js
+++ b/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js
@@ -91,9 +91,9 @@
                                                ed.pasteAsPlainText = false;
                                                ed.controlManager.setActive("pastetext", false);
                                        }
-                               } else if (/<(p|h[1-6]|ul|ol)/.test(o.content)) {
+                               //} else if (/<(p|h[1-6]|ul|ol)/.test(o.content)) {
                                        // Handle insertion of contents containing block elements separately
-                                       t._insertBlockContent(ed, dom, o.content);
+                               //      t._insertBlockContent(ed, dom, o.content);
                                } else {
                                        t._insert(o.content);
                                }

-- PaulHarvey - 02 Jun 2010

Magically fixed in TinyMCE 3.4

-- PaulHarvey - 24 Sep 2011

(Changed summary - ampersand was breaking rss)

-- GeorgeClark - 24 Sep 2011

Picked up by sync to trunk.

-- GeorgeClark - 23 Mar 2012
 
Topic revision: r9 - 11 Apr 2012, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy