MWReferenceNode: Don't allow cross-VE paste of template-defined ref

The reference body is not available, so it would be useless.

Bug: T110479
Change-Id: I2a40178bc629ca65d7507feb1c5ff062fd591eda
This commit is contained in:
Ed Sanders 2015-08-27 21:01:10 +01:00 committed by James D. Forrester
parent 397c5ce65e
commit c6236b7b77

View file

@ -171,6 +171,12 @@ ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, conver
}
}
// If we have no internal item data for this reference, don't let it get pasted into
// another VE document. T110479
if ( isForClipboard && itemNodeRange.isCollapsed() ) {
el.setAttribute( 'data-ve-ignore', 'true' );
}
// Generate name
listKeyParts = dataElement.attributes.listKey.match( this.listKeyRegex );
if ( listKeyParts[ 1 ] === 'auto' ) {