Merge "Fix preview of parent reference in context item"

This commit is contained in:
jenkins-bot 2024-06-15 07:02:12 +00:00 committed by Gerrit Code Review
commit c197e9e519
2 changed files with 4 additions and 4 deletions

View file

@ -126,7 +126,7 @@ ve.ui.MWReferenceContextItem.prototype.getDescription = function () {
* Get the text of the parent reference. * Get the text of the parent reference.
* *
* @private * @private
* @return {string|null} * @return {jQuery|null}
*/ */
ve.ui.MWReferenceContextItem.prototype.getParentRef = function () { ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
const extendsRef = this.model.getAttribute( 'extendsRef' ); const extendsRef = this.model.getAttribute( 'extendsRef' );
@ -135,9 +135,7 @@ ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
} }
const list = this.getFragment().getDocument().getInternalList(); const list = this.getFragment().getDocument().getInternalList();
const itemNode = list.getItemNode( list.keys.indexOf( extendsRef ) ); const itemNode = list.getItemNode( list.keys.indexOf( extendsRef ) );
const $element = new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element; return new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
return $element.text();
}; };
/** /**

View file

@ -17,6 +17,8 @@
word-break: break-word; word-break: break-word;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
// Disable click events in the preview
pointer-events: none;
+ .ve-ui-mwReferenceContextItem-muted { + .ve-ui-mwReferenceContextItem-muted {
margin-top: 0.5em; margin-top: 0.5em;