mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-11 16:49:26 +00:00
Merge "Fix preview of parent reference in context item"
This commit is contained in:
commit
c197e9e519
|
@ -126,7 +126,7 @@ ve.ui.MWReferenceContextItem.prototype.getDescription = function () {
|
|||
* Get the text of the parent reference.
|
||||
*
|
||||
* @private
|
||||
* @return {string|null}
|
||||
* @return {jQuery|null}
|
||||
*/
|
||||
ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
|
||||
const extendsRef = this.model.getAttribute( 'extendsRef' );
|
||||
|
@ -135,9 +135,7 @@ ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
|
|||
}
|
||||
const list = this.getFragment().getDocument().getInternalList();
|
||||
const itemNode = list.getItemNode( list.keys.indexOf( extendsRef ) );
|
||||
const $element = new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
|
||||
|
||||
return $element.text();
|
||||
return new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
// Disable click events in the preview
|
||||
pointer-events: none;
|
||||
|
||||
+ .ve-ui-mwReferenceContextItem-muted {
|
||||
margin-top: 0.5em;
|
||||
|
|
Loading…
Reference in a new issue