#6194 closed bug (worksforme)
Script tags not evaluated when loaded in page by Ajax, on WebKit
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | ajax | Version: | 1.5 |
Keywords: | script injection | Cc: | SlexAxton |
Blocked by: | Blocking: |
Description (last modified by )
I have content that is loaded via Ajax. The loaded content contains a <script> tag. Using jQuery 1.4.1, on Firefox and Safari 4.0.4 (both on Mac), when the content is loaded via Ajax, the code in the <script> tag is executed, as expected.
When using jQuery 1.4.2, the code in the <script> tag is executed when using Firefox, but not when using Safari (and apparently not when using WebKit-based browsers like Android 2's browser or webOS's browser.
This is clearly a regression.
Attachments (1)
Change History (10)
Changed 13 years ago by
Attachment: | ticket-6194.zip added |
---|
comment:1 Changed 13 years ago by
Steps to reproduce:
- Download and unzip the bug-6194.zip file attached to this bug.
- Open index.html using a WebKit based browser like Safari.
- click the "load via ajax" link. When you do, there should be an alert box that says "hello world" before the new content is loaded.
- Open the index.html page in a text editor. Comment out line #57 (the one that loads jQuery 1.4.1) and uncomment line 58 (the one that loads jQuery 1.4.2).
- Refresh the WebKit browser that's displaying index.html. Again, click on the "load via ajax" link. The new content will load, but the alert box will NOT be displayed (which is incorrect).
- Note that either version of jQuery works when using Firefox.
comment:2 Changed 13 years ago by
Component: | unfiled → ajax |
---|---|
Description: | modified (diff) |
comment:3 Changed 12 years ago by
This also happens in jQuery 1.4.3 and Safari 5.0.2.
Interestingly, this appears to be fixed in Chrome 8.0.552.11 dev (Mac).
comment:4 Changed 12 years ago by
Cc: | SlexAxton added |
---|---|
Keywords: | script injection added |
Milestone: | 1.4.2 → 1.4.5 |
Priority: | → high |
Status: | new → open |
Perhaps it's something in the clean
function that changed? I think this one is a regression worth looking into. I'll do some research, as well.
comment:6 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | open → closed |
test case works in current Chrome and Safari 5.0.3 (both on Windows) with jQuery 1.4.4.
Btw. I couldn't reproduce this at all, even when using the version this was reported against (1.4.2). So I guess this is/was either a bug in the plugin the original test case uses (jqTouch) or is a platform specific bug (unlikely).
Some mac-user please checkout my test case and also try switching between 1.4.2/1.4.3/1.4.4/jQuery-Git-version and report back if this has been fixed and if you can reproduce this with 1.4.2 at all.
comment:7 Changed 12 years ago by
Luck you! I'm at Rose's now on her Mac and your test is passing in both WebKit browsers.
comment:8 Changed 12 years ago by
Version: | 1.4.2 → 1.5 |
---|
There wasn't a 1.4.5 release, was actually 1.5.
comment:9 Changed 12 years ago by
Milestone: | 1.4.5 → 1.5 |
---|
There was no 1.4.5 release, was actually 1.5.
Test case showing bug