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

Change subject: Follow-up to 9b999622: don't slug paragraphs that contain just 
a text node
......................................................................


Follow-up to 9b999622: don't slug paragraphs that contain just a text node

Bug: 54791
Change-Id: Ide8b5320fae2622085f183c771173ef7190406ed
---
M modules/ve/ce/ve.ce.BranchNode.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve/ce/ve.ce.BranchNode.js 
b/modules/ve/ce/ve.ce.BranchNode.js
index b0dd262..e345f99 100644
--- a/modules/ve/ce/ve.ce.BranchNode.js
+++ b/modules/ve/ce/ve.ce.BranchNode.js
@@ -231,7 +231,7 @@
        // from becoming invisible/unfocusable. In Firefox, backspace after 
Ctrl-A leaves the document
        // completely empty, so this ensures DocumentNode gets a slug.
        // Can't use this.getLength() because the internal list adds to the 
length but doesn't render.
-       if ( this.$.children().length === 0 ) {
+       if ( this.$.contents().length === 0 ) {
                this.slugs[0] = doc.importNode( slug, true );
                this.$[0].appendChild( this.slugs[0] );
        } else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide8b5320fae2622085f183c771173ef7190406ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@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