#4011 closed bug (fixed)
Internet explorer 7.0.6001.18000 crashes on append
Reported by: | jacobww | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.4a1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Running
$('<p></p>').append(" ", " ");
in IE 7.0.6001.18000 will crash the browser. Bug found using the DateInput plugin from http://jonathanleighton.com/projects/date-input
Change History (6)
comment:1 Changed 14 years ago by
need: | Review → Patch |
---|---|
Owner: | set to john |
comment:2 Changed 14 years ago by
Component: | unfilled → core |
---|
comment:4 Changed 13 years ago by
need: | Patch → Commit |
---|
comment:5 Changed 13 years ago by
Milestone: | 1.3.2 → 1.4 |
---|---|
Version: | 1.3.1 → 1.4a1 |
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Landed: http://github.com/jquery/jquery/commit/628e1564c48f2b4d18ed5af89ebed88b09d972d4
Thanks Dave!
Note: See
TracTickets for help on using
tickets.
The error occurs in IE8 RC1 as well, in jQuery.clean on this line:
It's trying to append the text node in ret[i]. This is new to 1.3; 1.2.6 used a different approach for jQuery.clean. These will work in IE in 1.3:
but these will not:
Tracing it in the IE8 debugger, what seems to be happening is that the text node stored in
ret
becomes invalid when the second argument is processed by assigning intodiv.innerHTML
. In 1.2.6 the div was inside thejQuery.each(elems ...
function, but in 1.3 it was hoisted out and accessed by closure. When I moved it back inside the function, IE seemed to be satisfied again.