From 01f93f6f7b379f0ac3d10f96047f9afc7358d945 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 22 Jan 2019 12:25:49 +0100 Subject: [PATCH] FIx unrecoverable errors when using IE11 --- www/common/cursor.js | 2 +- www/common/sframe-chainpad-netflux-outer.js | 2 +- www/pad/cursor.js | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/www/common/cursor.js b/www/common/cursor.js index ceabfd133..dd5577be0 100644 --- a/www/common/cursor.js +++ b/www/common/cursor.js @@ -81,7 +81,7 @@ define([ var path = []; while (current !== element) { path.unshift(current); - current = current.parentElement; + current = current.parentNode; } if (current === element) { // Should always be the case diff --git a/www/common/sframe-chainpad-netflux-outer.js b/www/common/sframe-chainpad-netflux-outer.js index eaafe6656..a91f9f6d1 100644 --- a/www/common/sframe-chainpad-netflux-outer.js +++ b/www/common/sframe-chainpad-netflux-outer.js @@ -59,7 +59,7 @@ define([], function () { var id = ''; if (window.nacl) { var hash = window.nacl.hash(window.nacl.util.decodeUTF8(msg)); - id = window.nacl.util.encodeBase64(hash.slice(0, 8)) + '|'; + id = window.nacl.util.encodeBase64(hash.subarray(0, 8)) + '|'; } else { console.log("Checkpoint sent without an ID. Nacl is missing."); } diff --git a/www/pad/cursor.js b/www/pad/cursor.js index 491deb306..23e7e97f7 100644 --- a/www/pad/cursor.js +++ b/www/pad/cursor.js @@ -40,9 +40,9 @@ define([ var makeCursor = function (id, cursor) { if (cursors[id]) { - cursors[id].el.remove(); - cursors[id].elstart.remove(); - cursors[id].elend.remove(); + $(cursors[id].el).remove(); + $(cursors[id].elstart).remove(); + $(cursors[id].elend).remove(); } cursors[id] = { el: $('', { @@ -68,9 +68,9 @@ define([ }; var deleteCursor = function (id) { if (!cursors[id]) { return; } - cursors[id].el.remove(); - cursors[id].elstart.remove(); - cursors[id].elend.remove(); + $(cursors[id].el).remove(); + $(cursors[id].elstart).remove(); + $(cursors[id].elend).remove(); delete cursors[id]; };