From 230ec1104f9c6e980fa4d9d2066413c823487bd1 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <bruederli@kolabsys.com>
Date: Tue, 24 Feb 2015 09:48:44 -0500
Subject: [PATCH] Update internal reference to treelist node contents after insert. Fixes some strange behavior in FF 3.6
---
program/js/treelist.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 6f7bfbe..2927d02 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -366,6 +366,12 @@
indexbyid[node.id] = node;
+ // set new reference to node.html after insert
+ // will otherwise vanish in Firefox 3.6
+ if (typeof node.html == 'object') {
+ indexbyid[node.id].html = id2dom(node.id, true).children();
+ }
+
if (sort) {
resort_node(li, typeof sort == 'string' ? '[class~="' + sort + '"]' : '');
}
--
Gitblit v1.9.1