mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Fix link normalization when opening inspector"
This commit is contained in:
commit
886c5b47a2
|
@ -406,7 +406,8 @@ ve.ui.MWLinkAnnotationInspector.prototype.getInsertionData = function () {
|
||||||
{ type: '/link/mwNumberedExternal' }
|
{ type: '/link/mwNumberedExternal' }
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
return ve.ui.MWLinkAnnotationInspector.super.prototype.getInsertionData.call( this );
|
// Use user input, not normalized annotation, to preserve case
|
||||||
|
return this.annotationInput.getTextInputWidget().getValue();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ ve.ui.MWInternalLinkAnnotationWidget.static.getAnnotationFromText = function ( v
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
ve.ui.MWInternalLinkAnnotationWidget.static.getTextFromAnnotation = function ( annotation ) {
|
ve.ui.MWInternalLinkAnnotationWidget.static.getTextFromAnnotation = function ( annotation ) {
|
||||||
return annotation ? annotation.getAttribute( 'origTitle' ) || annotation.getAttribute( 'normalizedTitle' ) : '';
|
return annotation ? annotation.getAttribute( 'normalizedTitle' ) : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
Loading…
Reference in a new issue