From: Aleksander Ɓukasz Date: Tue, 18 Jun 2013 09:39:51 +0000 (+0200) Subject: Fixing selection of a new node after insert X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b2cdac312af506bf41ad920ab6071119ab08b9d3?ds=sidebyside Fixing selection of a new node after insert --- diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index bd959fe..51acbf3 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -84,7 +84,7 @@ return function(sandbox) { anchor.before(newNode) else anchor.after(newNode); - this.selectNode(newNode); + this.selectNode(new wlxmlNode.Node(newNode), {moveCarret: true}); //isDirty = true; sandbox.publish('contentChanged'); }, @@ -108,7 +108,7 @@ return function(sandbox) { newNode.before(prefix); newNode.after(suffix); - this.selectNode(newNode); + this.selectNode(new wlxmlNode.Node(newNode), {moveCarret: true}); //isDirty = true; sandbox.publish('contentChanged'); } @@ -135,7 +135,7 @@ return function(sandbox) { newNode.before(prefixNode); newNode.after(suffixNode); - this.selectNode(newNode); + this.selectNode(new wlxmlNode.Node(newNode), {moveCarret: true}); //isDirty = true; sandbox.publish('contentChanged'); }