Side navigation
#8782 closed bug (wontfix)
Opened April 06, 2011 06:37AM UTC
Closed July 12, 2011 03:15PM UTC
Last modified July 12, 2011 03:27PM UTC
.append() Bug
Reported by: | max2000pn@yahoo.it | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | event | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have found this bug working with Firefox 3.6 and 4 using jquery 1.4 or 1.5:
<div id="cont"></div>
<script>
$('#cont').append('<img onload=alert("test") src=img/abc.jpg >');
</script>
When I append the image the onload event fires twice. I had not this problem with jquery 1.3
thanks in advance
Massimo
Attachments (0)
Change History (4)
Changed April 06, 2011 02:39PM UTC by comment:1
component: | unfiled → event |
---|---|
status: | new → open |
Changed April 19, 2011 11:48PM UTC by comment:2
Having looked into this, I've narrowed this down to the call to clone that occurs in domManip around line 5362. I have no idea what the full implications of that call are, but - for example - hard-coding results.cacheable to false just before that call cancels the 'double event'. Hoping that's of some help to one of you who knows what you're doing :)
Changed July 12, 2011 03:15PM UTC by comment:3
priority: | undecided → low |
---|---|
resolution: | → wontfix |
status: | open → closed |
jQuery cannot be responsible for the behaviour inline of event handlers.
Thank you for submitting a bug report to the jQuery project.
In the future, please do not paste code in the ticket, but provide a test case on http://jsfiddle.net.
http://jsfiddle.net/timmywil/ERt2z/ It seems the inline event handler does get called twice.