jenkins-bot has submitted this change and it was merged.

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


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
---
M modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
index 973f500..6d99101 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
@@ -182,6 +182,9 @@
        // 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() )

-- 
To view, visit https://gerrit.wikimedia.org/r/312276
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6682ec0218fd3fbc573582753d815a56963eb71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <dly...@wikimedia.org>
Gerrit-Reviewer: Catrope <r...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to