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

Change subject: Ignore href DOM attribute when comparing links
......................................................................


Ignore href DOM attribute when comparing links

The DOM attribute only exists on elements which came from
HTML, not newly created elements, and the href is already
compared via the model attribute.

Bug: T95160
Change-Id: I544161a70b15797ae0aab957b8bd61ccfc4e8d54
---
M src/dm/annotations/ve.dm.LinkAnnotation.js
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/src/dm/annotations/ve.dm.LinkAnnotation.js 
b/src/dm/annotations/ve.dm.LinkAnnotation.js
index 03db7bd..ed67d7d 100644
--- a/src/dm/annotations/ve.dm.LinkAnnotation.js
+++ b/src/dm/annotations/ve.dm.LinkAnnotation.js
@@ -82,6 +82,15 @@
        };
 };
 
+/**
+ * @inheritdoc
+ */
+ve.dm.LinkAnnotation.prototype.getComparableHtmlAttributes = function () {
+       var comparableAttributes = 
ve.dm.LinkAnnotation.super.prototype.getComparableHtmlAttributes.call( this );
+       delete comparableAttributes.href;
+       return comparableAttributes;
+};
+
 /* Registration */
 
 ve.dm.modelRegistry.register( ve.dm.LinkAnnotation );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I544161a70b15797ae0aab957b8bd61ccfc4e8d54
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
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