From c77243192768ff3f62ac6d3e32a84762391e547c Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 15 Aug 2013 16:32:41 -0700 Subject: [PATCH] Fix issue in 7673a398 The update event passes in a transaction object, which was interpreted as a config object and fragmented the cache. Explicitly wrap the update() call in an event handler to make sure the config parameter is undefined. Change-Id: I641c68230b92d23626fb8b12aeab6a8904a35bcc --- modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js b/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js index fc207d58f4..a2eb107f80 100644 --- a/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js @@ -22,7 +22,7 @@ ve.ce.GeneratedContentNode = function VeCeGeneratedContentNode() { this.$.attr( 'contenteditable', false ); // Events - this.model.connect( this, { 'update': 'update' } ); + this.model.connect( this, { 'update': 'onGeneratedContentNodeUpdate' } ); // Initialization this.update(); @@ -71,6 +71,13 @@ ve.ce.GeneratedContentNode.prototype.generateContents = function () { /* Methods */ +/** + * Handler for the update event + */ +ve.ce.GeneratedContentNode.prototype.onGeneratedContentNodeUpdate = function () { + this.update(); +}; + /** * Rerender the contents of this node. *