summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-24 15:15:14 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-24 15:15:14 +0100
commitdb6663b936310cfc51f9ddd39ab7c338f5527256 (patch)
treed6176d7b06d4c523000fb5661a75e42524a1921c /program
parent8f485469c7955fbf5b420ee0b6f043282965715b (diff)
Update internal reference to treelist node contents after insert. Fixes some strange behavior in FF 3.6
Diffstat (limited to 'program')
-rw-r--r--program/js/treelist.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 6f7bfbef7..2927d02e5 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -366,6 +366,12 @@ function rcube_treelist_widget(node, p)
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 + '"]' : '');
}