Merge "Fix link normalization when opening inspector"

This commit is contained in:
jenkins-bot 2019-06-26 19:13:05 +00:00 committed by Gerrit Code Review
commit 886c5b47a2
2 changed files with 3 additions and 2 deletions

View file

@ -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();
} }
}; };

View file

@ -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 */