mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.AlienInlineNode.js
Christian Williams b740e694b9 BugID 43076 - Fixes to alien and phantom corner cases
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
2012-12-21 15:20:15 -08:00

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 );