mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
b740e694b9
The {{coords}} template is correctly rendered as an inlineAlien, which previously did not have shields. However, the template has a deeply nested span that is positioned and floated. The fix is to shift shielding logic up to AlienNode (from AlienBlockNode) and to show phantoms on all shields (both block and inline). I've also updated the aliens demo to exhibit this corner case. Change-Id: Ifce60c7762c0ead5c6fe29d6eabf601c1565cbfa
46 lines
905 B
JavaScript
46 lines
905 B
JavaScript
/**
|
|
* VisualEditor content editable AlienInlineNode class.
|
|
*
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* ContentEditable node for an alien inline node.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {ve.ce.AlienNode}
|
|
* @param {ve.dm.AlienInlineNode} model Model to observe.
|
|
*/
|
|
ve.ce.AlienInlineNode = function VeCeAlienInlineNode( model ) {
|
|
// Parent constructor
|
|
ve.ce.AlienNode.call( this, 'alienInline', model );
|
|
|
|
// DOM Changes
|
|
this.$.addClass( 've-ce-alienInlineNode' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ce.AlienInlineNode, ve.ce.AlienNode );
|
|
|
|
/* Static Members */
|
|
|
|
/**
|
|
* Node rules.
|
|
*
|
|
* @see ve.ce.NodeFactory
|
|
* @static
|
|
* @member
|
|
*/
|
|
ve.ce.AlienInlineNode.rules = {
|
|
'canBeSplit': false
|
|
};
|
|
|
|
/* Methods */
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.nodeFactory.register( 'alienInline', ve.ce.AlienInlineNode );
|