From 42c972116b6c497ee333053557008f55805feeb8 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 24 Mar 2016 12:50:04 +0100 Subject: [PATCH] leave TODO re: diffDOM and magicline Hyperjson guarantees that magicline elements are not sent across the wire. DiffDOM must guarantee that magicline elements will not be removed on remote edits. --- www/socket/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/socket/main.js b/www/socket/main.js index cbb7f66ed..a4c60afa8 100644 --- a/www/socket/main.js +++ b/www/socket/main.js @@ -68,6 +68,12 @@ define([ var diffOptions = { preDiffApply: function (info) { + /* TODO DiffDOM will filter out magicline plugin elements + in practice this will make it impossible to use it + while someone else is typing, which could be annoying + + we should check when such an element is going to be + removed, and prevent that from happening. */ // no use trying to recover the cursor if it doesn't exist if (!cursor.exists()) { return; } @@ -190,8 +196,8 @@ define([ onAbort: onAbort, // really basic operational transform + // reject patch if it results in invalid JSON transformFunction : JsonOT.validate - // pass in websocket/netflux object TODO }; var rti = module.realtimeInput = window.rti = realtimeInput.start($textarea[0], // synced element