Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/86685
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/85/86685/1 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: newchange Gerrit-Change-Id: Ide8b5320fae2622085f183c771173ef7190406ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope <roan.katt...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits