mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
Merge "Always pass a document model to the surface widget"
This commit is contained in:
commit
1c2dd6986f
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue