Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380905 )

Change subject: Do not setup inline slugs when rendering is locked
......................................................................

Do not setup inline slugs when rendering is locked

Bug: T176762
Change-Id: I54ab0c936efd27657bf8ad8899c5490291b0e0bb
(cherry picked from commit 7bcb9084baefe9fd96713cff1509c6c99439b278)
---
M src/ce/ve.ce.ContentBranchNode.js
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/05/380905/1

diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index 6e73bf5..cd3a292 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -161,6 +161,7 @@
  */
 ve.ce.ContentBranchNode.prototype.setupBlockSlugs = function () {
        // Respect render lock
+       // TODO: Can this check be moved into the parent method?
        if (
                this.root instanceof ve.ce.DocumentNode &&
                this.root.getSurface().isRenderingLocked()
@@ -172,6 +173,22 @@
 };
 
 /**
+ * @inheritdoc
+ */
+ve.ce.ContentBranchNode.prototype.setupInlineSlugs = function () {
+       // Respect render lock
+       // TODO: Can this check be moved into the parent method?
+       if (
+               this.root instanceof ve.ce.DocumentNode &&
+               this.root.getSurface().isRenderingLocked()
+       ) {
+               return;
+       }
+       // Parent method
+       ve.ce.ContentBranchNode.super.prototype.setupInlineSlugs.apply( this, 
arguments );
+};
+
+/**
  * Get an HTML rendering of the contents.
  *
  * If you are actually going to append the result to a DOM, you need to

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54ab0c936efd27657bf8ad8899c5490291b0e0bb
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.31.0-wmf.1
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Divec <da...@troi.org>

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

Reply via email to