From 2995b6af11c75c66e6a3a398486bd01c70bfd016 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 8 Aug 2013 09:42:40 +0200 Subject: [PATCH] Fix: Missing contentChange event on typing --- modules/documentCanvas/canvas/canvas.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 9282d20..0041f6c 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -313,8 +313,11 @@ $.extend(Canvas.prototype, { var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { - if(documentElement.DocumentTextElement.isContentContainer(mutation.target) && mutation.target.data === '') - mutation.target.data = utils.unicode.ZWS; + if(documentElement.DocumentTextElement.isContentContainer(mutation.target)) { + if(mutation.target.data === '') + mutation.target.data = utils.unicode.ZWS; + canvas.publisher('contentChanged'); + } }); }); var config = { attributes: false, childList: false, characterData: true, subtree: true, characterDataOldValue: true}; -- 2.20.1