From f5f8f6e1eb3057aeaeea3336f6e2ba65b57ae443 Mon Sep 17 00:00:00 2001 From: Yann Flory Date: Tue, 26 Apr 2016 17:50:54 +0200 Subject: [PATCH] Remove the delay between a change and its propagation to chainpad --- www/code/main.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/www/code/main.js b/www/code/main.js index f65453622..6b9aa65fa 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -110,8 +110,8 @@ define([ var onLocal = config.onLocal = function () { if (initializing) { return; } console.log("LOCAL"); - module.patchText(canonicalize($textarea.val())); editor.save(); + module.patchText(canonicalize($textarea.val())); }; var onAbort = config.onAbort = function (info) { @@ -123,15 +123,6 @@ define([ var realtime = module.realtime = Realtime.start(config); editor.on('change', onLocal); - - ['keydown', /*'keyup',*/ 'select', 'mousedown', 'mouseup', 'click'].forEach(function (evt) { - $textarea.on(evt, function () { - onRemote(); - onLocal(); - }); - // onLocal? - }); - }; var interval = 100;