Closed kwent closed 9 years ago
Sorry, but I use Firefox myself and I have not noticed a problem - do you see the issue when viewing the demos on jstree.com? If you provide a demo I will reopen the issue and help you.
Best regards, Ivan
Hi Ivan,
Well. It's cause i use jstree in a firefox extension. So they added protection to query data from another domain. But i added my api domain to the whitelist of package.json
. All API Requests are going through and my data are returned. But the tree is only refreshed with the first request. When trying to see subtrees, it's fetching data but not refreshing tree (infinite loader).
This error below might be why ...
JavaScript error: resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-om7ejgwa1u8ag-at-jetpack/quiptree/data/jstree.js, line 1476: Error: Not allowed to define cross-origin object as property on [Object] or [Array] XrayWrapper
Line 1476
in my jstree.js
is dom.children = []
_append_json_data : function (dom, data, cb, force_processing) {
if(this.element === null) { return; }
dom = this.get_node(dom);
dom.children = []; # This line
dom.children_d = [];
// *%$@!!!
if(data.d) {
data = data.d;
if(typeof data === "string") {
data = JSON.parse(data);
}
}
Maybe : http://stackoverflow.com/questions/10992517/how-to-get-content-from-this-xraywrapper ?
It might be not a Jstree bug but any help would be appreciate...
Best Regards,
I do not think this is a jstree problem, but still - could you please post your config? My guess is that you are not returning an array of plain objects.
Best regards, Ivan
@vakata I gave you the access to my repository.
gulp build && gulp firefox:xpi
cd tmp/firefox && cfx run
Go to quip.com, create an account and play with the tree.
After a quick look I noticed a couple of things:
1) replace this cb.call(folder, tree)
, with cb(tree)
- no need to set the context to a non existing object
2) tree
actually is a promise object, not the data itself - fix that in the core.data
function, you should call cb
with an array, not a promise object.
This should be enough to get you going, sorry, I do not have time to debug further. Let me know if you run into any issues with jstree.
Best regards, Ivan
Hi,
My subtrees are not refreshed and stuck on the loading state when i clicked on one parent folder on Firefox. I checked my log messages and i don't have any API errors. My API is responding with the right data. Not issues on Chrome. (More information about browsers versions below).
I noticed this message when running
cfx run
:Regards,