Merge "Always pass a document model to the surface widget"

This commit is contained in:
jenkins-bot 2014-02-19 23:51:16 +00:00 committed by Gerrit Code Review
commit 1c2dd6986f

View file

@ -286,12 +286,12 @@ ve.ui.MWMediaEditDialog.prototype.setup = function ( data ) {
if ( this.captionNode && this.captionNode.getLength() > 0 ) {
newDoc = doc.cloneFromRange( this.captionNode.getRange() );
} else {
newDoc = [
newDoc = new ve.dm.Document( [
{ 'type': 'paragraph', 'internal': { 'generated': 'wrapper' } },
{ 'type': '/paragraph' },
{ 'type': 'internalList' },
{ 'type': '/internalList' }
];
] );
}
this.captionSurface = new ve.ui.SurfaceWidget(