Closed skwp closed 11 years ago
Hmm. That's super sad, and odd. I'm sure I'm rendering a partial from an XHR response in at least one application, and haven't experienced this. If I get a chance I'll do some testing.
Yeah, I'm wondering if it's something about the number in there that's making it freak out.
Trying to duplicate this tonight because I had another report of this happening. I wish I could say I was successful.
@skwp could you pull down the gh-22-xhr-requests
branch, run rake server
to start the dummy app, and tell me if you can edit the views to make this break? Here's where the XHR is happening:
Sorry I didn't see your comment. I'll try to reproduce with the latest version. Do you think it's fixed in this commit?
Nope, no fix yet.
I think I may have a slightly better idea of what's going on though. The XHR itself isn't the problem - it's probably that certain jQuery operations on a set starting with an HTML comment will fail if they expect the first element in the set to be, well... not a comment node.
You should be able to test this theory in your code if you use $(html).filter('*')
where html
is the XHR's response string. That will return a new jQuery set without any junk, like xray's comments.
If that makes your code work, I'll have to seriously consider implementing #24 in some fashion.
No further feedback on this, so I'm closing, but know that I'm going to implement an alternative to the xray comments very soon that should take care of this isuse for good.
When x-ray is enabled in chrome prototype ajax is breaking for me. Disabling it resolves the issue.
Our server is returning a snippet of html which jquery is parsing. When xray is turned on, the response looks like this:
It seems this causes an error in jquery 1.8 and possibly later versions while parsing the XHR response:
I'm not sure what to do about it yet, but if we figure it out, we'll submit a pull request.