mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
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:
parent
397c5ce65e
commit
c6236b7b77
|
@ -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
|
// Generate name
|
||||||
listKeyParts = dataElement.attributes.listKey.match( this.listKeyRegex );
|
listKeyParts = dataElement.attributes.listKey.match( this.listKeyRegex );
|
||||||
if ( listKeyParts[ 1 ] === 'auto' ) {
|
if ( listKeyParts[ 1 ] === 'auto' ) {
|
||||||
|
|
Loading…
Reference in a new issue