From a7da21ccba9e9fe4a49e04d0c8cbca448ff621a4 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Thu, 11 Feb 2016 16:22:59 +0100 Subject: [PATCH] Remove the cursor treatment --- www/vdom/main.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/www/vdom/main.js b/www/vdom/main.js index 350e5e8ca..1f18f4f6f 100644 --- a/www/vdom/main.js +++ b/www/vdom/main.js @@ -65,20 +65,19 @@ define([ var userDocStateDom = Vdom.create(Convert.hjson.to.vdom(JSON.parse(shjson))); userDocStateDom.setAttribute("contentEditable", "true"); // lol wtf var patch = (new DiffDom()).diff(inner, userDocStateDom); - console.log(userDocStateDom.outerHTML); (new DiffDom()).apply(inner, patch); }; var onRemote = function (shjson) { // remember where the cursor is - cursor.update() + //cursor.update() applyHjson(shjson); - cursor.find(); + //cursor.find(); // put the cursor back where you left it - cursor.replace(); + //cursor.replace(); }; var onInit = function (info) { @@ -139,14 +138,14 @@ define([ $textarea.val(JSON.stringify(hjson)); rti.bumpSharejs(); - cursor.update() + //cursor.update() }); - ['mouseup', 'keyup'].forEach(function (type) { + /*['mouseup', 'keyup'].forEach(function (type) { editor.document.on(type, function (e) { cursor.update(); }); - }); + });*/ }); };