Side navigation
#1793 closed bug (duplicate)
Opened October 10, 2007 07:18PM UTC
Closed October 17, 2007 10:10PM UTC
Bug in domManip - mal-timed script evaluation
Reported by: | Jebber007 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | core | Version: | 1.2.1 |
Keywords: | domManip, evalScripts | Cc: | |
Blocked by: | Blocking: |
Description
If you do an ajax load, with this being the content, it will fail.
<div> <input type="text" id="test" value="Test" /> <script>alert(document.getElementById('test').value);</script> </div>
However, THIS currently works:
<input type="text" id="test" value="Test" /> <script>alert(document.getElementById('test').value);</script>
This worked previously in Version 1.1.3.1, but stopped working in 1.1.4 and hasn't worked since.
We did some tweaking, and found that in the globalEval function, if the line:
eval.call( window, data );
was changed to:
window.setTimeout( data, 0 );
...it started working for us.
Thanks for the great work, guys!
Hello,
I have corrected this bug with a patch that you can find here:
http://dev.jquery.com/ticket/1698
Cheers,
Gabriel