hummingbird-dev / hummingbird-treeview

A powerful and fast jQuery treeview plugin
MIT License
62 stars 23 forks source link

addNode is unable to find the correct anchor #14

Open Goswinus opened 5 years ago

Goswinus commented 5 years ago

Not a critical issue!

I was using a dot ('.') in the data-id of a specific (placeholder) node.

addNode is not able to find this node by data-id.

Line 606 of hummingbird-treeview.js is currently: var that_node = tree.find('input:checkbox[' + anchor_attr + '=' + anchor_name + ']').parent("label").parent("li");

One possible fix is to enclose the anchor_name in double-quotes: var that_node = tree.find('input:checkbox[' + anchor_attr + '="' + anchor_name + '"]').parent("label").parent("li");