VisualEditor: Pasting a table with a caption breaks fixUpInsertion
Closed, ResolvedPublic

Description

Safari 7

Copy on https://www.mediawiki.org/wiki/VisualEditor?veaction=edit

From and including the header Timeline, up to the paragraph before "Notes" headline (including the table).

Past in an empty surface:

[Error] TypeError: 'undefined' is not an object (evaluating 'source.clone')
copy (undefined, line 3)
getClonedElement
fixupInsertion
fixupInsertion
newFromDocumentInsertion
afterPaste
proxy (load.php, line 10)


Version: unspecified
Severity: normal

TheDJ created this task.Via LegacyDec 11 2013, 8:59 AM
Esanders added a comment.Via ConduitDec 11 2013, 3:13 PM

The problem here is that fixUpInsertion is deciding you can't put a table in a paragraph but not resolving properly.

Esanders added a comment.Via ConduitDec 11 2013, 3:15 PM

More detail: the problem is caused by ContentEditable (surprise). When you paste a table into an empty paragraph, the paragraph is *completely* deleted, which the paste context comparer can't currently deal with.

Esanders added a comment.Via ConduitDec 11 2013, 3:31 PM

Part of this appears to be caused by table captions. Investigating.

gerritbot added a comment.Via ConduitDec 11 2013, 3:45 PM

Change 100792 had a related patch set uploaded by Esanders:
Allow tables to contain captions!

https://gerrit.wikimedia.org/r/100792

gerritbot added a comment.Via ConduitDec 11 2013, 6:21 PM

Change 100792 merged by jenkins-bot:
Allow tables to contain captions!

https://gerrit.wikimedia.org/r/100792

gerritbot added a comment.Via ConduitDec 11 2013, 10:06 PM

Change 100916 had a related patch set uploaded by Jforrester:
Allow tables to contain captions!

https://gerrit.wikimedia.org/r/100916

gerritbot added a comment.Via ConduitDec 11 2013, 11:13 PM

Change 100916 merged by jenkins-bot:
Allow tables to contain captions!

https://gerrit.wikimedia.org/r/100916

Jdforrester-WMF added a comment.Via ConduitDec 12 2013, 12:34 AM

Pushed to wmf6.

Jdforrester-WMF set Security to None.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.