Ticket #10903 (closed bug: patchwelcome)
'append' in IE local intranet web site does not work well with if Internet security zone Active Scripting is disabled
|Reported by:||ewolfman@…||Owned by:|
Although this is probably an IE only bug, jQuery "falls" for it and a workaround can be easily provided. Steps to reproduce:
- Insert an new element using 'append' with an 'onclick' event.
- In IE, set Local Intranet security zone's Active Scripting to Enabled, and Internet security zone's Active Scripting to disabled.
- Ensure that the html is running on a local web site, by right clicking and selecting Properties on the browsed page. It should read as "Local Intranet" (otherwise the bug will not reproduce).
- Browse the page. The 'onclick' is not triggered.
This seems like an IE bug. It seems like setting the innerHTML property on a new element not yet in the DOM causes IE to ignore the event. If innerHTML is performed on an element that exists in the DOM, the event is triggered correctly. For example: jQuery's 'html' works well because it replaces the innerHTML for an element already in the DOM.
The requested bug fix/workaround is that 'append' (and possibly other jQuery DOM insertion methods) will change the order of things: set the innerHTML after appending the element to the DOM, and not prior to it.
- Cc dmethvin added
- Priority changed from undecided to low
- Component changed from unfiled to manipulation