Hello,
Using dhtmlx pro.
I have an issue that is only occuring in firefox. I am using the latest version 29.0 however it occured in version 18.0 as well.
When instantiating the tree I am setting:
tree.enableCheckBoxes(false, true);
Pseudo code:
I am loading the tree from JSON using the .loadJSONObject(json, function() {
view.setTreeStyle();
}
the setTreeStyle() function loops through the tree grabbing the ids using getSubItems(0) which returns an array of ids of the items I want to add checkbox’s to.
Code:
var items = tree.getSubItems(0).split(“,”);
for(var i = 0; i < items.length; i++){
tree.showItemCheckbox(items[i], true);
}
This code works in IE7/8 and Chrome(multiple versions)
In firefox the checkboxs do not display. Stepping through the code I find that the that is the parent for the checkbox image is set to “display:none” in Firefox only.
Stepping through the dhtmlxtree.js code I find this line(171):
(window._KHTMLrv) d.parentNode.style.display = !a.nocheckbox ? ’ ’ : ‘none’; is not executing because window._KHTMLrv is false.
The style.display is being set correctly on the img but not on the parentNode in firefox.
Removing the conditional and setting the d.parentNode.style.display sets the display to ’ ’ correctly and renders the checkboxs in FF.
Changed code:
d.parentNode.style.display = !a.nocheckbox ? ’ ’ : ‘none’;
- Are you aware of this bug?
- Is there a fix for it?
I’d like to have the fixed version of the tree so I don’t have to modify source in the event of an upgrade later. We are a pro user. If you need licensing information to provide updated source please let me know.