ui.MWLinkAnnotationInspector: skip internal link checking if the value has changed

If the value has changed since the event was fired, we're operating on old
data, *and* another event will have been fired for that change anyway. So
abort this check.

Bug: T146306
Change-Id: Ia6682ec0218fd3fbc573582753d815a56963eb71
This commit is contained in:
David Lynch 2016-09-22 11:23:48 -05:00
parent 80618cc629
commit d28819f795

View file

@ -182,6 +182,9 @@ ve.ui.MWLinkAnnotationInspector.prototype.onInternalLinkInputChange = function (
// schemas that use the full set of allowed characters, and we might get
// more false positives by checking for them.
// Note 3: We allow protocol-relative URIs here.
if ( this.internalAnnotationInput.getTextInputWidget().getValue() !== value ) {
return;
}
if (
!this.allowProtocolInInternal &&
/^(?:[a-z][a-z0-9\$\-_@\.&!\*"'\(\),]*:)?\/\//i.test( value.trim() )