From 890e3143c7146ecc4b1982e13369134d518864df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Mon, 2 Dec 2013 14:29:47 +0100 Subject: [PATCH 1/1] Fix: Do not set text on canvas element if it didn't change. On setting the same text on a text node Chrome does nothing, but FF triggers ContentObserver handler. --- src/editor/modules/documentCanvas/canvas/wlxmlListener.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor/modules/documentCanvas/canvas/wlxmlListener.js b/src/editor/modules/documentCanvas/canvas/wlxmlListener.js index ce9de6d..80da027 100644 --- a/src/editor/modules/documentCanvas/canvas/wlxmlListener.js +++ b/src/editor/modules/documentCanvas/canvas/wlxmlListener.js @@ -73,7 +73,9 @@ var handlers = { if(toSet === '') { toSet = utils.unicode.ZWS; } - canvasElement.setText(toSet); + if(toSet !== canvasElement.getText()) { + canvasElement.setText(toSet); + } } }; -- 2.20.1