Divec has uploaded a new change for review.
https://gerrit.wikimedia.org/r/221884
Change subject: Change order to handle derived method call from base constructor
......................................................................
Change order to handle derived method call from base constructor
Partially construct ve.ce.ContentBranchNode before calling the constructor for
base class ve.ce.BranchNode. The latter calls ve.ce.ContentBranchNode.onSplice
which reads and modifies this.rendered .
Change-Id: I90ed05c4134a029c4743ab25cc1abfbb44074938
---
M src/ce/ve.ce.ContentBranchNode.js
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/84/221884/1
diff --git a/src/ce/ve.ce.ContentBranchNode.js
b/src/ce/ve.ce.ContentBranchNode.js
index 45a93e8..48de0ec 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -16,9 +16,6 @@
* @param {Object} [config] Configuration options
*/
ve.ce.ContentBranchNode = function VeCeContentBranchNode( model, config ) {
- // Parent constructor
- ve.ce.BranchNode.call( this, model, config );
-
// Properties
this.lastTransaction = null;
this.rendered = false;
@@ -26,6 +23,9 @@
this.unicorns = null;
this.onClickHandler = this.onClick.bind( this );
+ // Parent constructor (after the above, because it will call back into
this class)
+ ve.ce.BranchNode.call( this, model, config );
+
// Events
this.connect( this, { childUpdate: 'onChildUpdate' } );
// Some browsers allow clicking links inside contenteditable, such as
in iOS Safari when the
--
To view, visit https://gerrit.wikimedia.org/r/221884
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90ed05c4134a029c4743ab25cc1abfbb44074938
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits